1

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!

Community
  • 1
  • 1
JohnIdol
  • 48,899
  • 61
  • 158
  • 242

4 Answers4

3

I think this reference is really helpful - link

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

Svetlozar Angelov
  • 21,214
  • 6
  • 62
  • 67
1

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
  • 46,929
  • 26
  • 130
  • 185
0

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
  • 15,510
  • 44
  • 57
-1

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
  • 12,206
  • 8
  • 54
  • 70