OpenGL and DWM

So I was trying my old OpenGL game in Vista, and all I get is a black window. I notice that if I do not use the Aero theme it works fine, but all I get is black if I do. So I try some other OpenGL apps and the same thing happens. I end up reading about this DWM (Desktop Window Manager) of Vista, and find a way to disable it in my code, and then it works, but that means the screen blinks and I do not have the fancy Aero stuff until I close the program down. I think this is weird and there must be a way to render opengl programs with the dwm enabled, I must be doing something stupid. So I read this where it says:

“DWM is implemented using Direct3D 9, and as such it was originally thought that OpenGL applications could not interoperate with DWM and DWM would need to shut down in the presence of an OpenGL application. This is not the case. Windows Vista provides a mechanism for hardware vendors to use to integrate an OpenGL application with DWM, which acts in the exact same manner as D3D9 and GDI integration with DWM via shared surfaces (a new feature of WDDM).”

So apparently it’s up to my hardware vendor, NVIDIA, and they if anyone should have implemented this right? I am using the latest drivers of my geforce so right now I’m thinking either I’m doing something stupid or it’s nvidia’s fault?

Basically my question is, why are my opengl apps black, when windowed, using aero? Anyone with insight into this?

Are you using a single-buffered window? OpenGL works perfectly with DWM if some simple guidelines are followed, like calling glFlush on singlebuffered windows (or using double-buffered ones) and not using GDI with OpenGL windows.

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