Jump to content

  • Log In with Google      Sign In   
  • Create Account

tweduk

Member Since 05 Oct 2006
Offline Last Active Mar 06 2013 11:15 AM

#5040039 DirectX 11 as DLL + WPF for UI

Posted by tweduk on 06 March 2013 - 10:59 AM

There is a third method, which is to use a HwndHost control. I'm currently using this for an application that I'm working on and it appears to work and meet my needs so far. The main drawback is that most Win32 messages directed to the HWND in the HwndHost are not automatically forwarded to WPF, so I have to actually raise mouse events etc. myself.

 

Regarding WindowsFormsHost, I haven't tried it but I heard about it after implementing a HwndHost-based DX11Host class. It actually looks like it might be a better method than HwndHost. I may get around to trying this at some point, but I don't see why it won't work.

 

I have heard of people using a shared surface technique, where you create a D3D9 render target, which should be straightforward in WPF, and somehow getting a D3D11 handle to it. Apparently this works only in Windows 7 or later. I haven't tried this myself, but see

 

http://msdn.microsoft.com/en-gb/library/windows/desktop/ff476531(v=vs.85).aspx




PARTNERS