Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Rufeooo

Surface Locking in Normal Cooperation mode

This topic is 6153 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

Can surface locking be done while you are you in DDSCL_NORMAL? By this I mean: DirectDrawCreate(NULL,&m_lpDD,NULL) != DD_OK m_lpDD->SetCooperativeLevel(m_hWnd, DDSCL_NORMAL); While running in exclusive I can lock my surface, copy a bitmap into it, and continue happily. If I change to normal mode, the surface can never be locked, it crashes. I''m trying to debug other things and I really need to be out of exclusive mode. The surface->lock(...) has been giving me persistant trouble. If there is a better way to move an image from a array of rgb values into a surface let me know. Thanks. ~Alan

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
i am taiwanese, so my english very pool, i use DirectX 7.0

of course, can locked surface in noraml mode (Windowed Mode).

if you used DirectX 7.0, you can see SDK Samples:
in directory samples\multimedia\ddraw\src\switcher

Share this post


Link to post
Share on other sites
you can lock anything except the primary buffer. (though you might be able to, check the sdk docs to be sure). best bet is to make a back buffer (you should have one anyway) and then after moving the data onto the back buffer you can use primary buffer''s blt to get the back buffer onto the primary buffer.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!