Sign in to follow this  

not needed to lock/unlock surfaces...

This topic is 4714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey all, i've just started setting up directdraw for my next game and have noticed some very strange things. i'm using double buffering btw firstly: if i lock the back buffer to draw on, nothing gets drawn... secondly: if i unlock the back buffer, or fail to lock it, everything is drawn as its supposed to be... lastly: if i remove all lock/unlock code, everything works fine, including page flipping... i was wondering why is this happening? in my first DX game, locking and unlocking worked as they should and im using the same code now but things have gone weird... the code is pretty standard but if you'd like to take a look, please ask. thanks in advance for any comments/explanations

Share this post


Link to post
Share on other sites
This could be due to delayed rendering schema.

Direct3D doesn't render things as you execute appropriate drawing calls, but waits for bigger amount of geometry / operations (probably depending on drivers) and then does the job.

Some operations like present (maybe lock / unlock too) make all of the commands on the card's queue flushed, so after executing them you can see results of making previous calls.

Share this post


Link to post
Share on other sites

This topic is 4714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this