In Windows 8 DirectX 11 is now part of the Windows SDK. However, the Win8 version does not ship with some deprecated code like the D3DX11 library. Therefore, to get the book’s samples up and running with little modification, we need to install the June 2010 SDK. The official steps are outlined in this MSDN article:
However, below is a simplified step-by-step guide using the “Sprites and Text” sample from here: http://d3dcoder.net/resources.htm
1. Install Visual Studio 2012 Express for Windows Desktop
2. Download and install the June 2010 SDK (we needs this for D3DX11 stuff).
If you rework the samples to not use D3DX11, then you could skip this step. See (http://d3dcoder.net/Data/Resources/d3d11Metro.pdf). Also, you can still use Effects11 without the June 2010 SDK, but you need to download the latest version from here:
This version removed the dependency on D3DX11. Therefore, the only real work to be done to not depend on the old SDK is to remove the D3DX11 texture loading code, and port to DirectXTex (http://directxtex.codeplex.com/).
3. Whichever version of Effects11 you use, you need to rebuild it with VS 2012 in debug and release to get VS 2012 versions of Effects11d.lib and Effects11.lib. Move these to the book’s “Common” directory.
4. Setup paths in VS 2012 to the June DirectX SDK, just like you did in VS 2010, as outlined in the book. However, it is important that the Windows SDK path comes first, so put the DXSDK references after the defaults:
Executable Directories $(ExecutablePath);$(DXSDK_DIR)Utilities\bin\x86
Include Directories $(IncludePath);$(DXSDK_DIR)Include
Library Directories $(LibraryPath);$(DXSDK_DIR)Lib\x86
5. We need to replace all lines
with the following so that the right headers get included (the Win8 ones instead of the June 2010 ones):
In most of the book demos, this just has to be done in d3dUtil.h.