OpenGL and MDI

Hi everyone,

I try to implement a MDI application with MSVC6 on a NT-machine. If I create a OpenGL-View everything works fine with the first window. If I open the second window the content of the first window disappears or gets blank. Sometimes the second window will show the content of the first window. I create a context and switch it in the OnDraw-function (wglMakeCurrent), I switched off/on double buffering, nothing helps. Is there anywhere an example with a MDI interface in source code which I can download and analyze?

You have to create a context for each window and switch the context depending on which window you are currently rendering.


Thank you, but I did that. I found a MDI-example in, and even this example shows the same effekt. After some research I found that my grafics card driver is buggy, although I had the newest. I installed an older driver -> thats it!

Let me guess… ATI Rage IIc… Got the same problem there.

Yes, you are right. With an older driver (5.1.118) it seems to work better; not perfect, sometimes if I open the view it will not render, as soon as I resize the window it works.