Jump to content
  • Advertisement
Sign in to follow this  
Daggerbot

(wgl) Modifying pixel format...

This topic is 3124 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'm writing a thin wrapper around wgl, which I will eventually wrap around other OpenGL implementations such as glX, and I have run into a slight problem. According to MSDN, you have to set the pixel format of a device context (HDC) before creating a rendering context (HGLRC). Does this mean that if you want to change the pixel format of the device context, you have to first delete the rendering context? This would free resources like texture and vertex buffers. Is there any way to modify the pixel format of an active context without losing the associated resources? The only way I can think of is to hide the window, create a new window with a new context that share resources with the old context, then delete the old window and show the new one. I would like to avoid this if at all possible. Any help is 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.

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

Sign me up!