在DirectX11的WPF中SharpDX 2.5 [英] SharpDX 2.5 in DirectX11 in WPF
问题描述
我试图用SharpDX 2.5到WPF来实现的DirectX 11。
可悲的是 http://directx4wpf.codeplex.com/ 并的 http://sharpdxwpf.codeplex.com/ 不SharpDX 2.5正常工作。我还没有能够端口WPFHost DX10样品DX11和本实施例的全码包是向下:的http:// WWW。 indiedev.de/wiki/DirectX_in_WPF_integrieren
I'm trying to implement DirectX 11 using SharpDX 2.5 into WPF. Sadly http://directx4wpf.codeplex.com/ and http://sharpdxwpf.codeplex.com/ don't work properly with SharpDX 2.5. I was also not able to port the WPFHost DX10 sample to DX11 and the full code package of this example is down: http://www.indiedev.de/wiki/DirectX_in_WPF_integrieren
有人建议可以实施的另一种方式?
Can someone suggest another way of implementing?
推荐答案
SharpDX支持WPF相对=nofollow> SharpDXElement 。
SharpDX supports WPF via SharpDXElement.
您可以在样品在 Toolkit.sln
库 - 所有项目有 WPF
以他们的名义使用 SharpDXElement
为渲染面:
Take a look in the Samples repository at the Toolkit.sln
- all projects that have WPF
in their name use SharpDXElement
as rendering surface:
-
MiniCube.WPF
- 演示基本SharpDX-WPF集成; -
MiniCube.SwitchContext.WPF
- 演示基本方案时,游戏实例的生命周期是从SharpDXElement的生命周期不同(换句话说 - 当有需要切换另一面的游戏渲染) - <$ C。 $ C> MiniCube.SwitchContext.WPF.MVVM - 同上,但更多的'MVVM路
MiniCube.WPF
- demonstrates basic SharpDX-WPF integration;MiniCube.SwitchContext.WPF
- demonstrates basic scenario when lifetime of the Game instance is different from the lifetime of SharpDXElement (in other words - when there is need to switch game rendering on another surface).MiniCube.SwitchContext.WPF.MVVM
- same as above, but more 'MVVM-way'.
更新:SharpDX.Toolkit已被弃用,它不再被维护。它被移动到一个单独的存储库。该工具包的样品已被删除,但我改变了链接到变更,他们仍然存在。
Update: SharpDX.Toolkit has been deprecated and it is not maintained anymore. It is moved to a separate repository. The Toolkit samples were deleted, however I changed the link to a changeset where they are still present.
这篇关于在DirectX11的WPF中SharpDX 2.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!