Jump to content
  • Advertisement

Archived

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

vanBobik

window mode+lock?

This topic is 6411 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 guys, i write some direct draw classes and for fullscreen everythig is ok. but now i want to add windowed-mode functionality. in full screen i lock surface, write data directly to backbuffer surface videomem, unlock and flip. should i do it in windowed mode same way? so lock,write to mem, unlock and then blt** to front buffer? cause i don''t want to rewrite all my drawing functions. all of them write directly to videomem after lock. thanx....

Share this post


Link to post
Share on other sites
Advertisement
Thats basically it. Just make sure you blit to the correct place on the front buffer (i.e. the desktop). See the DirectDraw samples for more info.

The only real difference is that you have to check for the window moving and resizing, and be aware that the user could have any type of pixel format for their desktop.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!