more comments…

Eli asked about OpenGL, Direct Draw, and WPF,  and how they work with Desktop composition…

OpenGL can go through one of three paths in Windows Vista depending on how your computer is configured.

  1. MSOGL – this is an implementation of OpenGL 1.4 that uses Direct3D under the covers to hardware accellerate the application.

  2. Legacy ICD’s – These are the ICD’s that are available today for use on Windows XP. These will continue to work on Windows Vista, but will disable the DWM when they are loaded in to the process of the application that’s using OpenGL. The reason for this is that Legacy ICD’s operate directly on the GPU without going through Windows at all, and we have no way of redirecting application’s output in a stable, predictable manner.

  3. Windows Vista ICD’s – this is a new path for 3rd party ICD’s introduced for Windows Vista that will work in a way that is compatible with desktop composition. Essentially allowing direct access to the GPU for hardware accellaration, but then having the final surface that appears to be the front buffer to the application actually be a shared surface that gets composed by the DWM

DirectDraw works by creating shared surface and allowing you to draw to it, but if your application locks the primary for drawing, this will cause the DWM to shut down also, because the applicaiton is essentially saying “I’m a full-screen application, so give me the the whole screen to draw to, instead of whoever is currently using it”.

WPF is hardware accellerated for things like text, geometrry, etc. and presents to a D3D shared surface which is the composed to the desktop by the DWM.

Comments (24)

  1. steamy says:

    Kam, i found an interesting thing.

    on 5308 (maybe in previous builds as well, i dont know) the taskbar and the start menu uses a different font rendering (not cleartype) when DWM is enabled, than under non-DWM mode.

    what kind of font rendering is that, is it new? is it going to be used everywhere when DWM is enabled, or is it going to stay on the taskbar and start menu exclusively? i like a lot more than cleartype because it doesnt have the "coloring effekt" and makes the font a little bit stronger. does it have anything to do with WPF?

  2. Kam VedBrat says:

    I’m pretty sure the cleartype wierdness in the start menu is a bug… should be fixed in later builds.

  3. steamy says:

    thx, i hope to see more of these bugs:-)) it really looks better to me.

  4. Spydre says:

    Kudos for supporting option #3. Now I can stop bitching…

  5. Eli says:

    Wow, I didn’t think you’d answer all that. Great information. =)

  6. ion says:

    Just one more question:

    Is it possible to enable anti-aliasing on DWM to prevent the jagged edges on skin and in Flip3D?

  7. David says:

    If this is true – path No. 3 approach for OpenGL

    I gotta thank MS for doing the right thing at last…

  8. nopcoder says:

    thx, option #3 is great news!

  9. Brandon says:

    ion, I’m pretty sure there was a registry key at some point which enabled AA on flip3d.  Not sure if it’s in 5308 though

  10. 息乐园 says:

    <ul class="bullets"><li> <a href="" target="_blank">AOL 将把 变成技术新闻渠道</a>
     </li><li> <a href=""

  11. HTK says:

    You have been dugg:

    OpenGL may not be widely important to the general public, but it is a sensitive issue to some niches.

  12. Iosif says:

    Option #3 is great news indeed.

    Is there any info on when  Vista ICD kits for option #3 will be available for driver developers or are they already available?.

  13. KRAMER says:

    Exceptional post!!

  14. pmd says:

    I tried this out in 5308, just doing enough to do a glGetString.  Some pixel formats invoke the Microsoft generic render (bitmap, some window setups), and others invoke the D3D translation layer.

    The generic renderer seems to not bother the Desktop Compositor, but the D3D translation layer renderer *always* does that awful cycle of:

    1. cycle all the monitors and disable DC

    2. run the app

    3. cycle all the monitors and enable DC

    I don’t really mind using MSOGL, but is that really how it’s supposed to work?  That still kinda sucks.  Or am I doing it wrong?

  15. skyman_2001 says:

    Advanced Visual Effects with OpenGL – Inside the GDC 2006