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 either Visual Studio 2012 or Visual Studio 2010. It requires the Windows 8.0 SDK for functionality such as the DirectXMath library and optionally the DXGI 1.2 headers. Visual Studio 2012 already includes this Windows SDK, but Visual Studio 2010 users must install the standalone Windows 8.0 SDK. Details on using the Windows 8.0 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
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
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_Windows8 is for Windows Store apps building with VS 2012
- DirectXTK_WindowsPhone8 is for Windows phone 8 apps building with VS 2012 and the Windows Phone 8.0 SDK
- 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.0 SDK
In 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 relative path to DirectXTK\inc;
to the Additional Include Directories
properties. Click Apply.
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