Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Problems with MFC and OpenGL objects together with Windows 7 Aero
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 · ·