Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / lock pixels bug

Author
Message
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Jul 2009 16:00 Edited at: 20th Jul 2009 14:45
The following code should produce a rectangle of random dots in the centre of the screen - but will only work correctly if I remove the lock/unlock pair of statements. This seems to defeat the purpose of having a lock/unlock pair.

The code works correctly, with or without the lock/unlock pair, if I use IanM's fill circle function.



Edit Forgot to add that this bug is present in both U7.3 and U7.4beta9.

Edit2 This may be a Vista problem - I can't reproduce the bug on my laptop (XP) but have just confirmed that the bug is also present in U7.1 on my Vista machine.

Could someone else with Vista test this and report back?

Edit3

Here are screenshots of what I get. The first is what the image should look like:



The second is what I get with the lock/unlock pixels pair included on my Vista machine:



[Edit4 Help!! Black pixels don't show up as black - had to change both images to a near black background!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jul 2009 14:42
Here is the second screenshot.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Jul 2009 00:41
Actually, I'm surprised that it correctly draws under XP. I also suspect that it's more driver-specific than OS-specific.

I believe that DX does not guarantee that a render will work on a locked surface (the BOX command is implemented as a rendered quad). I'll check it out.

Whether it works or not, locking the surface won't speed up the box command anyway - that's there specifically for making the 'true' 2D commands faster. Those are DOT, LINE, CIRCLE, ELLIPSE and POINT ... I think that's all of them.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2009 22:24
Sounds like another Help file issue - box is listed under the basic2D command set after all.

Thanks for looking into this.

Login to post a reply

Server time is: 2026-06-10 05:53:36
Your offset time is: 2026-06-10 05:53:36