Jump to content
  • Advertisement
Sign in to follow this  
mark shaxted

OpenGL contexts, wglsharelists & textures...

This topic is 4003 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 have an application which uses two top level windows for rendering in a multi monitor configuration. I need to be able to switch to and from fullscreen mode (ChangeDisplaySettingsEx) on both monitors. My understanding (from Nehe) is that I need to set fullscreen mode before creating the windows, which means I must destroy and recreate each window for each mode change, which also means I must destroy and recreate opengl contexts for each window. This implies that I must reload all textures upon mode change. Firstly, would a reasonable strategy be to create a third hidden window (maybe 1x1 pixel) and use this to share textures with the two visible windows? This would remove the need to reload textures at each mode change. Secondly, using wglShareLists, does it matter which context is current when creating the shared textures? For example... dummyContext (hidden, shares it's resources) window1Context (get recreated on mode change) window2Context (get recreated on mode change) wglShareLists( dummyContext, window1Context); wglShareLists( dummyContext, window2Context); ...if I make current the dummy context and create a new texture it will be shared with both window contexts - that's fine. However, if, for example, window1Context is the current context when I create a new texture will it be visible to window2Context? Or should I always switch back to the dummy context when creating textures? Many thanks. Mark

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!