2 dibsections with OpenGL

I have been successfully using OpenGL for a single Windows dibsection.

Now I want to use OpenGL for a dibsection associated with a popup as well.

However, when I exit the popup, OpenGL rendering to the main window dibsection doesn’t work anymore.

I tried saving the DC and context before creating the second dibsection and then setting wglMakeCurrent( hOldDC, hOldRC ) after the second dibsection was destroyed. That didn’t help.

I tried repeating the entire process for creating an OpenGL view for the first dibsection. That didn’t help.

I must be altering something associated with the first dibsection that makes it impossible to reinitialize it with OpenGL, but I don’t know what that is.

I bet that if I recreated the main window dibsection and initialized it with OpenGL, it would work, but I don’t want to have to destroy a relatively huge bitmap and then recreate it just to get this to work.

Any ideas?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.