Public headers are in the Inc
folder of the distribution package.
All the functions in the library are in the DirectX
This code is designed to build with Visual Studio 2010, 2012, or 2013. It requires the Windows 8.x SDK for functionality such as the DirectXMath library and optionally the DXGI 1.2 headers. Visual Studio 2012 and 2013 already include the Windows 8.x SDK, but Visual Studio 2010 users must install the standalone Windows 8.x SDK http://go.microsoft.com/fwlink/?LinkID=323507
. Details on using the Windows 8.x SDK with VS 2010 are described on the Visual C++ Team Blog http://blogs.msdn.com/b/vcblog/archive/2012/11/23/using-the-windows-8-sdk-with-visual-studio-2010-configuring-multiple-projects.aspx
and the required .props files are included in the DirectX Tool Kit package.
These components are designed to work without requiring any content from the DirectX SDK. For details, see "Where is the DirectX SDK"? http://msdn.microsoft.com/en-us/library/ee663275.aspx
and "Where is the DirectX SDK (2013 Edition)?" http://blogs.msdn.com/b/chuckw/archive/2013/07/01/where-is-the-directx-sdk-2013-edition.aspx
Adding to a VS Project
In your application's solution, right-click on the Solution and use "Add \ Existing Project..." to add the appropriate .vcxproj file to your solution.
- DirectXTK_Windows81 is for Windows Store apps building with VS 2013 targeting Windows 8.1 / RT 8.1
- DirectXTK_Windows8 is for Windows Store apps building with VS 2012 targeting Windows 8 / RT
- DirectXTK_WindowsPhone8 is for Windows phone 8 apps building with VS 2012 or VS 2013 and the Windows Phone 8.0 SDK
- DirectXTK_Desktop_2013 is for Win32 desktop applications building with the VS 2013 Express for Desktop, VS 2013 Professional or higher
- DirectXTK_Desktop_2012 is for Win32 desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
- DirectXTK_Desktop_2010 is for Win32 desktop applications building with VS 2010 using the Windows 8.1 SDK
- DirectXTK_XboxOneXDK is for Xbox One exclusive apps building with VS 2012 using the Xbox One XDK
- DirectXTK_XboxOneADK is for Xbox One hub apps building with VS 2012 using the Xbox One ADK
n your application's project, right-click on the Project and use "References...", then "Add New Reference...", and then check the DirectXTK project name and click OK. For a Windows Store app
, you need to set Reference Assembly Output
since DirectXTK is a static C++ library and not a WinRT component.
In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Plaforms", and then add the path $(SolutionDir)\DirectXTK\inc;
to the Additional Include Directories
properties. Click Apply.
When using VS 2010 with the Windows 8.x SDK, or when using VS 2012 with the Windows 8.1 SDK, you'll need to apply the correct .props files to your projects as well as use the correct DirectXTK project. http://blogs.msdn.com/b/vcblog/archive/2012/11/23/using-the-windows-8-sdk-with-visual-studio-2010-configuring-multiple-projects.aspx
To use the Visual Studio 2012 & 2013 graphics assets tools in the build system, be sure to add them to your project. http://msdn.microsoft.com/en-us/library/hh972446.aspxThe graphics assets tools are not present in the Express editions of Visual Studio 2012. They are present in the Visual Studio 2013 Express for Windows edition, but not in VS 2013 Express for Windows Desktop.
DirectXTK makes use of C++ exception handling which should be enabled by the application via the /EHsc compiler switch. In Visual Studio, this is set in the project settings under "C++ / Code Generation" with Enable C++ Exceptions
set to "Yes (/EHsc)" for all configurations.http://msdn.microsoft.com/en-us/library/4t3saedz.aspxhttp://msdn.microsoft.com/en-us/library/d14azbfh.aspxhttp://blogs.msdn.com/b/chuckw/archive/2012/09/17/dual-use-coding-techniques-for-games.aspxhttp://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization
Xbox One XDK Note
Xbox One exclusive apps developers using the Xbox One XDK need to generate the Src\Shaders\Compiled\XboxOne*.inc files to build the library as they are not included in the distribution package. They are built by running the script in Src\Shaders - "CompileShaders xbox", and should be generated with the matching FXC compiler from the Xbox One XDK. While they will continue to work if outdated, a mismatch will cause runtime compilation overhead that would otherwise be avoided.