Pages

Sunday, December 27, 2009

Fighting with Direct11 - part 1

I've recently got onto 3D graphics and I resolved to code something interesting. As you know, some time ago Microsoft gave us a new SDK for DirectX11. As I always prefer to use the most recent technology I decided to give it a try. And from there the steep steps stairs began. Microsoft didn't show off very well with its SDK. Firstly, a manual is very succinct and there is no good tutorials. Secondly a new Effects system API and DXUT sucks. For example you have to compile those two on your own. But that's not the end of the story...

D3D11 introduces a concept of Downlevel Hardware - generally this feature allows you write an application in D3D11 for the hardware compatible with at least D3D9. I decided on the start to implement available tutorials from D3D10. Everything was going smoothly to the time, when I tried to run application. I had spent two days to get known why ID3D11DeviceContext::Draw(...) reports access violation error. Fortunately, I found a note on this blog. As it turned out it is impossible to use the Effect Framework from D3D11 on Downlevel Hardware without any hacks. The only solution I could find was modification of few lines of code inside the Effect Framework.

Happily, at last everything ended well and I saw a beautiful red triangle on the blue background. No more such suprises in the future!

No comments:

Post a Comment