#16 – Use Direct3D For Hard-Core 3D Applications
July 28, 2010 3 Comments
Although WPF supports drawing 3D objects, Direct3D should still be used where an application needs 3D features not provided by WPF, or needs maximum performance in drawing 3D objects.
WPF 4.0 is based on DirectX 9, so it does not support Direct3D 10 or Direct3D 11.
WPF allows you to host WinForms controls though. So you can write a D3D10+ control which is compatible with WinForms (they have a standard window handle which D3D can be attached to), and then host it in WPF, so that the rest of the application can still use WPF.
Good point/tip, thanks.
Oh by the way, I found another way to do interop with WPF:
http://msdn.microsoft.com/en-us/library/ee913554(v=vs.85).aspx#interoperability_between_direct3d_9ex_and_dxgi_based_apis
Basically you can copy between D3D9 and D3D10+/D2D/DXGI surfaces, so you can render with D3D10 and then copy to the WPF surfaces using this functionality.