Jump to content
  • Advertisement
Sign in to follow this  
gowin32

OpenGL OpenGL rendering context over multiple display settings in Win32

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

Hi, I've been looking for a while for an answer to this question but haven't been able to find any discussion on it. This is all working in the context of Win32. What happens to the display of an OpenGL rendering context when you change display settings? For example, suppose that my current display settings are something with 32-bit color depth. Suppose I create a window, set its pixel format to something with 32-bit color depth, create an OpenGL rendering context and make it current, and have something being displayed in it. Then suppose I make a call to ChangeDisplaySettings and change my display settings to something with 16-bit color depth. In general, what will happen to the display of the rendering context? Is the behaviour unspecified and rather it's best to recreate everything on display settings changes? From reading discussions on similar topics, it seems that the general consensus is that both the window and rendering context should be destroyed and recreated after a display settings change. However, there are never any explanations or references given for this practice, so I don't see why it should be true. The main reason I ask this is because I did a small test where I enumerated the pixel formats of a device context under two different display settings and discovered that both the total count and types of pixel formats were different. This seems to indicate that pixel formats are dependent on display settings. A weird potential situation arises: it may be that I've set the pixel format of a device context to be a pixel format which, under different display settings, is no longer enumerated as a valid pixel format of that same device context. This sounds like a bad situation if I also have a rendering context that was created from that pixel format. I haven't been able to track down any information on this through much reading of the Win32 documentation either. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
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!