Search code examples
direct3ddirect3d11direct3d9direct3d10

Tutorial 2 of msdn "Direct3D Tutorial Win32 Sample"


Hi I am trying to do Tutorial2 of https://code.msdn.microsoft.com/windowsdesktop/Direct3D-Tutorial-Win32-829979ef#content.

In Tutorial 1 I had to add #pragma comment(lib,"d3d11.lib") to make it work.

In Tutorial 2, I added 2 pragmas,#pragma comment(lib,"d3d11.lib") and #pragma comment(lib,"D3DCompiler.lib"). But still I can't build it. The .hlsl files produce the error:{Error X1507 failed to open source file: 'Tutorial02.fx'}. I tried to locate Tutorial02.fx in my computer but couldn't. Any idea where this file would be or how to make this work? I am using Visual studio 2015 community edition.


Solution

  • Since you are using VS 2015, I assume you opened the Tutorials.sln and upgraded them to v140, yes?

    I just did that and was able to build all the tutorials for all configurations without any problem using VS 2015. It sounds like you may not have expanded the package correctly because Tutorial02.fx is clearly present in the package.

    Note that I've not updated the MSDN copies of my samples in some time. I now maintain them on GitHub.