WPF and DirectX 11 via D3DImage

Alex picture Alex · Feb 1, 2012 · Viewed 12.5k times · Source

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:

WPF & DirectX 10 via D3DImage

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.

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 ?

You can find my code here: http://www.gamedev.net/topic/619534-wpf-directx-11-via-d3dimage/

Answer

Alex picture Alex · Feb 2, 2012

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.