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.