Advertisement

[DIRECTX11] CreateInputLayout() returns false

Started by February 17, 2015 12:08 PM
1 comment, last by Fredericvo 9 years, 10 months ago

Lately I've been following rasertek's DirectX programming and in my code the createinputlayout()function does not work. I think I've got the same code the source does, but createinputlayoutkeeps returning false.

Code: https://gist.github.com/anonymous/69091f045bcadaa246dd#file-textureshaderclass-cpp-L52

You will want to cache the HRESULT you get back from the call it will tell you what went wrong, here are some DX11 error codes https://msdn.microsoft.com/en-us/library/windows/desktop/ff476174%28v=vs.85%29.aspx. It can also return a normal Windows error code. If you have the DirectX SDK installed it comes with an error look up tool which can translate the HRESULT errors to human readable errors.

Also there is a typo in this line:

polygonLayout[1].Format - DXGI_FORMAT_R32G32_FLOAT;

shouldnt the "-" be a "="

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

Advertisement
polygonLayout[1].Format - DXGI_FORMAT_R32G32_FLOAT;

Look closely. You have a minus sign in place of an equal "=" sign.

This topic is closed to new replies.

Advertisement