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
- SpriteBatch - simple & efficient 2D sprite rendering
- SpriteFont - bitmap based text rendering
- Effects - set of built-in shaders for common rendering tasks
- PrimitiveBatch - simple and efficient way to draw user primitives
- GeometricPrimitive - draws basic shapes such as cubes and spheres
- Model - draws simple meshes loaded from .CMO or .SDKMESH files
- CommonStates - factory providing commonly used D3D state objects
- VertexTypes - structures for commonly used vertex data formats
- DDSTextureLoader - light-weight DDS file texture loader
- WICTextureLoader - WIC-based image file texture loader
- ScreenGrab - light-weight screen shot saver
- SimpleMath - simplified C++ wrapper for DirectXMath
Tools
MakeSpriteFontBuilding
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.aspxThese 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 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