Jump to content
  • Advertisement
Sign in to follow this  
rutski

OpenGL WGL, wglMakeCurrent, "on the same device"

This topic is 3788 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 going through hell trying to figure out what is meant by a certain phrase in Microsoft's WGL documentation. The following is a link to the relevant page on wglMakeCurrent(): http://msdn.microsoft.com/en-us/library/ms537558(VS.85).aspx The "Remarks" section says the following thing, which to me sounds too vague: "The hdc parameter must refer to a drawing surface supported by OpenGL. It need not be the same hdc that was passed to wglCreateContext when hglrc was created, but it must be on the same device and have the same pixel format." Now, here comes the real question. What exactly is mean by "...on the same device"? If I create the WGL context with HDC #1, but then want to later use to to render into HDC #2, how do I ensure that both HDC #1 and #2 are "on the same device". Is a "device" here a physical device, or some sort of virtual device that might span multiple physical devices? I actually do need to do this when switching from a "full screen" window (of WS_POPUP style) to a standard window (of WS_OVERLAPPEDWINDOW style). No amount of googling or thumbing through Petzold has helped here. -Patrick

Share this post


Link to post
Share on other sites
Advertisement
Sorry, I have never understood what they are talking about.
In general, if you want to switch from fullscreen to window, it is best to destroy the window and recreate it along with all the GL resources.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!