I solve a strange behavior of MFC graphic objects together with OpenGL objects when Windows 7 Aero is enabled on my desktop. I describe that matter more detail now, I have created MDI application by MFC framework in VC++ where I have implemented OpenGL functions to draw 3D objects. In some child windows, there is a need to draw any 2D graphic objects provided by MFC (e.g. ellipse) realized by CDC to that window where has been drawn OpenGL 3D object. When Aero is disabled, it works excellently but if it's enabled, then e.g. ellipse is drawn into a rectangle area that has a background including rubbish of some graphical buffer (probably second buffer of the double buffer drawing). I know, the Aero is a new technology implemented there that uses double buffer mechanism. I'm also able to disable Aero motive from my application, but it has a global influence to all running applications because their appearence is change to the basic motive. I don't want to solve this problem by disabling the Aero, it's not professional. I would like to solve the objects drawing where I mix OpenGL rendering context together with MFC device context in one child window.
[size=1]When I specify the PIXELFORMATDESCRIPTOR structure for the SetPixelFormat function with PFD_DOUBLEBUFFER flag, then I have the mentioned problem. When I change the flag to PFD_SUPPORT_GDI, then it works properly but the 3D objects drawing is too slow, it's really unusable.
Does anybody know how to solve[/size] this unpleasant problem with mentioned graphical constellation?
Is there any mechanism to block the double buffers drawing?
Thanks for answers.
0 · ·