Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Direct3D to WPF  Daosheng Mu    2012.1.3
Outline• WPF• Direct3D• Binding-P/Invoke, CIL
WPF• Windows Presentation Foundation  – Based on .NET 3.0  – GUI utilizes DirectX  – eXtensible Application Markup Languag...
Direct3D• 3D graphics API supported by Microsoft• Utilize GPU hardware acceleration• Used to render 3D application which  ...
Communication between WPF/D3D• How?  – P/Invoke    • extern identifier, huge cost  – CIL(Common Intermediate Language)    ...
How to write CLI• Project Setting  – Adjust on Win32 dll project  – Create CLR project
Adjust on Win32 dll project      Add dll to WPF project
Adjust on Win32 dll project                       Code Generation
Adjust on Win32 dll                 CLR Support
Create CLR Project              Create CLR Class Library
CIL Sample• Extend Idisposable• Class ref• *ObjPtr using  IntPtr
Result• https://github.com/DaoshengMu/WPFd3dIma  geCpp
Nächste SlideShare
Wird geladen in …5
×

Direct3D to WPF

2.354 Aufrufe

Veröffentlicht am

Talk about using Direct3D on WPF

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Direct3D to WPF

  1. 1. Direct3D to WPF Daosheng Mu 2012.1.3
  2. 2. Outline• WPF• Direct3D• Binding-P/Invoke, CIL
  3. 3. WPF• Windows Presentation Foundation – Based on .NET 3.0 – GUI utilizes DirectX – eXtensible Application Markup Language (XAML) • For more effective to develop UI
  4. 4. Direct3D• 3D graphics API supported by Microsoft• Utilize GPU hardware acceleration• Used to render 3D application which performance is important• Game engine usually is designed to use c++/d3d commonly
  5. 5. Communication between WPF/D3D• How? – P/Invoke • extern identifier, huge cost – CIL(Common Intermediate Language) • Marshaling at compile time, better performance
  6. 6. How to write CLI• Project Setting – Adjust on Win32 dll project – Create CLR project
  7. 7. Adjust on Win32 dll project Add dll to WPF project
  8. 8. Adjust on Win32 dll project Code Generation
  9. 9. Adjust on Win32 dll CLR Support
  10. 10. Create CLR Project Create CLR Class Library
  11. 11. CIL Sample• Extend Idisposable• Class ref• *ObjPtr using IntPtr
  12. 12. Result• https://github.com/DaoshengMu/WPFd3dIma geCpp

×