views:

237

answers:

4

As a follow up tho this and this other question, I am now trying to understand (out of curiosity) if WPF totally/mostly relies on Direct3D calls (and not 2D DirectDraw ones) even for standard controls, such as buttons or even the container window itself.

Wikipedia states:

All graphics, including desktop items like windows, are based on Direct3D

Is this true? Can someone expand and provide further resources on the subject?

Any help appreciated!

+1  A: 

It relies on d3d because you can composite even 2d "standard" controls onto a 3d surface if you wanted.

Check out this video which shows some of those capabilities: http://channel9.msdn.com/posts/AdamKinney/WPF-35-SP1-Graphics-with-David-Teitlebaum/

Joel Martinez
+3  A: 

I think this reference is really helpful - link

In fact, as described earlier, WPF relies entirely on Direct3D for rendering.

Svetlozar Angelov
thanks - that link helped a lot (religious war going on in the office)
JohnIdol
A: 

If you go into blend, select a button, and "edit a copy" of the button's template, you'll see the exact XAML that's used to make a WPF button look just like a "standard" (MFC?) button for the current windows theme. You can tweak this a tiny bit or a lot - and it will be rendered through the same pipeline as if you'd never touched the template.

So yes: even the "standard controls" are rendered via direct3d

Rob Fonseca-Ensor
+1  A: 

Direct2D is deprecated. The interface still exists back from a previous version, but it is not being updated, and in current versions of DirectX you are supposed to use Direct3D for 2D work.

Pete
I don't think so, IE9 is using Direct2D.
Zach
Ahh, you are right, I was confusing Direct2D with DirectDraw.
Pete