WPF和DirectX 11通过D3DImage [英] WPF and DirectX 11 via D3DImage
问题描述
我想从非托管C ++代码使用DirectX 11,并使用WFP作为GUI。 SlimDX不适合我。
我找到了解决方案使工作的WPF与DirectX 10:
I want to use DirectX 11 from unmanaged C++ code and use WFP for the GUI. SlimDX is not suitable for me. I have found the solution to make working WPF with DirectX 10:
但我无法设法使用DirectX 11工作。只是有两个按钮的空白屏幕。
任何人都知道如何使WPF与DirectX 11一起工作。
But I couldn't manage to work it with DirectX 11. Just blank screen with two buttons. Does anybody know how to make WPF working with DirectX 11.
我也看到当我只是运行这个例子时,CPU使用率约为4 -5%的Intel i5 750(Windows 7 64位,NVidia Geforce 430)。我认为它太多..可以减少CPU使用率?
Also I had seen that when I'm just running this example the CPU usage is about 4-5% for Intel i5 750 (Windows 7 64 bit, NVidia Geforce 430). I think it's too much.. Is it possible to decrease CPU usage ?
您可以在这里找到我的代码: http://www.gamedev.net/topic/619534-wpf-directx-11-via-d3dimage/
You can find my code here: http://www.gamedev.net/topic/619534-wpf-directx-11-via-d3dimage/
推荐答案
我对顶点缓冲区布局使用了错误的格式。我使用DXGI_FORMAT_B8G8R8A8_UNORM,但在我的情况下必须使用DXGI_FORMAT_R32G32B32_FLOAT。
I used wrong format for the vertex buffer layout. I used DXGI_FORMAT_B8G8R8A8_UNORM, but have to use DXGI_FORMAT_R32G32B32_FLOAT in my case.
这篇关于WPF和DirectX 11通过D3DImage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!