Jump to content
  • Advertisement
Sign in to follow this  
n-p

Switch between window and fullscreen mode in DirectDraw

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

How do I manage it with DirectDraw to switch between fullscreen and window mode?

I mean, in both cases the whole variables are initialized completely different: The CooperationLevel is different and while the back buffer in fullscreen mode is connected with the front buffer and the output is switched with the Flip command, the back buffer in window mode is just one more surface where all images are blittet to and then the back buffer is manually blitted to the front buffer.
And then we have the window itself: In fullscreen mode a window without a title bar is created, in window mode we create a normal one.

So, what do I generally have to do if a user shall not only choose in the beginning if window or fullscreen is used, but if this switch shall also be possible during the program is running? What's the general approach here?

Share this post


Link to post
Share on other sites
Advertisement
The general approach is to not use DirectDraw anymore. First of all DirectDraw is deprecated and should not be used for any new development. This leads to the second reason. As nearly nobody use it anymore it’s hard to find people that still knows enough about it to answer questions.

If you still want to go with it was common to write to functions for everything that is different between window and full screen mode. Then during runtime the right function was called. If someone want allow to switch the most common way was to cleanup all objects and reinitialize everything.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!