Headers

Public headers are in the Inc folder of the distribution package.

Namespace

All the functions in the library are in the DirectX C++ namespace.

Modules

Tools

MakeSpriteFont

Building

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 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_Windows81Preview is for Windows Store apps building with VS 2013 Preview targeting Windows 8.1 Preview
  • DirectXTK_Windows8 is for Windows Store apps building with VS 2012 targeting Windows 8
  • DirectXTK_WindowsPhone8 is for Windows phone 8 apps building with VS 2012 or VS 2013 Preview and the Windows Phone 8.0 SDK
  • DirectXTK_Desktop_2013 is for Win32 desktop applications building with the VS 2013 Preview (Express for Desktop, 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.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 to false 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.

Error Handling

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.aspx
http://msdn.microsoft.com/en-us/library/d14azbfh.aspx
http://blogs.msdn.com/b/chuckw/archive/2012/09/17/dual-use-coding-techniques-for-games.aspx
http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

Last edited Jul 16, 2013 at 7:36 PM by walbourn, version 31