Announcement

Collapse
No announcement yet.

Vista Aero and Opengl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vista Aero and Opengl

    I have run into some issues with mixed GDI and Opengl in vista:

    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.
    Question, how does one disable Aero algorithmically in code?

    thanks, D

  • #2
    Question, how does one disable Aero algorithmically in code
    There are several solutions (however not simple) to run OpenGL even in DWM AERO mode on VISTA/W7. My GDImage is able to mix GDI32/GDI+/OpenGL altogether, but in all instance i am drawing everything on the GDImage surface.

    I have posted in my dedicated section on the José's Roca forum an example named AeroGL (rendering OpenGL on a layered window) that "perhaps" could help you.

    See also my "Boing" demo and "BassBox".

    ...
    Patrice Terrier
    Member
    Last edited by Patrice Terrier; 5 Nov 2009, 10:35 AM.
    Patrice Terrier
    www.zapsolution.com
    www.objreader.com
    Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

    Comment


    • #3
      Hi Dean,

      if I may ask, why do you need to combine GDI with OpenGL render? Is it for fonts?

      You might try to render to bitmap (Frame Buffer Object I think) and then blit it on screen + using GDI.


      Petr
      [email protected]

      Comment


      • #4
        it is for the selection window. This is drawn in the GDI. but now it doens't show up. I can post the code later. Maybe you can suggest a fix.

        Comment

        Working...
        X