Jump to content
  • Advertisement
Sign in to follow this  

OpenGL fullscreen problem

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

I am adding OpenGL fullscreen Windows support to an MFC app(I know it's old) and I ran into a problem when switching from fullscreen back to windowed mode. After going back to windowed mode, the first frame drawn is in the client area of the window as it should be but looks like garbage(the colors seem to match with what I am drawing normally but it is jumbled about). On the second and future frames, it still looks like garbage but also draws over toolbars and a dockable MFC panel I have in there. It works fine for me at home and at work with 1 monitor enabled. It only fails with dual monitor enabled(and probably more that 2 monitors). In a nutshell, when my renderer switches to fullscreen I: - choose the appropriate DEVMODE - ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN) - Create a window to handle the fullscreen mode - add a render context for the new window and make it current - show the window - render this works fine. I got most of this method off a NEHE tutorial. to switch from fullscreen to windowed I: - ChangeDisplaySettings(NULL,0); - Make the original render context current - destroy the fullscreen window - render as usual any insight would be greatly appreciated!

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!