I have run into some issues with mixed GDI and Opengl in vista:
the following is the recommendation:
Question, how does one disable Aero algorithmically in code?
thanks, D
the following is the recommendation:
What All This Means for the OpenGL Developer
GDI compatibility notes
GDI usage over 3D accelerated regions is incompatible with Windows Aero, so developers have two options:
Disable Windows Aero
Do not use GDI on top of OpenGL rendering.
Windows Vista introduces the new pixelformat flag PFD_SUPPORT_COMPOSITION (defined in the Driver Development Kit's wingdi.h as 0x00008000). Creating an OpenGL context for a pixelformat without this flag will disable composition for the duration of the process which created the context. The flag is mutually exclusive with PFD_SUPPORT_GDI.
If a developer must use GDI on top of an OpenGL context, use the following rules:
Create an OpenGL context using a pixelformat with GDI support (PFD_SUPPORT_GDI flag set). As this flag is mutually exclusive with PFD_SUPPORT_COMPOSITION, this will disable Aero for the lifetime of the current process.
Don't use BeginPaint/EndPaint outside the WM_PAINT message handling.
As on Windows XP, use the API synchronization calls whenever necessary: GdiFlush to synchronize GDI with OpenGL rendering and glFinish for the converse.
GDI compatibility notes
GDI usage over 3D accelerated regions is incompatible with Windows Aero, so developers have two options:
Disable Windows Aero
Do not use GDI on top of OpenGL rendering.
Windows Vista introduces the new pixelformat flag PFD_SUPPORT_COMPOSITION (defined in the Driver Development Kit's wingdi.h as 0x00008000). Creating an OpenGL context for a pixelformat without this flag will disable composition for the duration of the process which created the context. The flag is mutually exclusive with PFD_SUPPORT_GDI.
If a developer must use GDI on top of an OpenGL context, use the following rules:
Create an OpenGL context using a pixelformat with GDI support (PFD_SUPPORT_GDI flag set). As this flag is mutually exclusive with PFD_SUPPORT_COMPOSITION, this will disable Aero for the lifetime of the current process.
Don't use BeginPaint/EndPaint outside the WM_PAINT message handling.
As on Windows XP, use the API synchronization calls whenever necessary: GdiFlush to synchronize GDI with OpenGL rendering and glFinish for the converse.
thanks, D
Comment