I am learning Direct3D and I am following this lesson.
When I was supposed to to load a texture using:
HRESULT D3DX11CreateShaderResourceViewFromFile( _In_ ID3D11Device *pDevice, _In_ LPCTSTR pSrcFile, _In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo, _In_ ID3DX11ThreadPump *pPump, _Out_ ID3D11ShaderResourceView **ppShaderResourceView, _Out_ HRESULT *pHResult );
I came across microsoft reference , stating:
Note The D3DX (D3DX 9, D3DX 10, and D3DX 11) utility library is deprecated for Windows 8 and is not supported for Windows Store apps.
Note Instead of using this function, we recommend that you use these:
So I went ahead and downloaded "DirectXTex.zip" from DirectXTex .
I unzip it, place it in some random directory... and end up looking at "DirectXTex\DDSTextureLoader" containing the ".h" and ".cpp" files.
I link those files to my project (after painful failures and simply pointing to additional includes to ".h" and linking ".cpp" by dragging to project instead of failing documentation) and use
// Load texture. CreateDDSTextureFromFile(dev, L"poop.jpg", 0, &cubesTexture);
(Without knowing what "DDS" actually means, skipping the overly-complicated text on the internet) ... wham.. bham... and it compiles.
I launch it... and...
Any idea on how to whack this sucker? I'm currently stuck and unable to continue, so any help would be much appreciated.
I have tried compiling it into a library using visual studio project files from "DirectXTex\DirectXTex" and linking via "additional library paths" (or similar name) and putting a dependency of generated ".lib" in the linker. This failed to even compile with an unresolved external symbol (needles to say the linker didn't like it).
Edited by RoundPotato, 16 May 2014 - 07:23 PM.