DirectXTK (Tool Kit)

DirectX Tool Kit, DirectXTK, is a utility library that addresses additional runtime needs for Direct3D 11 applications beyond the DirectXTex texure library. DirectXTK is a runtime library. In contrast, the DirectXTex library is a build-time library and provides all the ‘texture content processing’ functionality from the D3DX library.

DirectXTK includes the following components:

Component Description
SpriteBatch A 2D sprite rendering class. This is a C++ version of the SpriteBatch used for XNA Game Studio.
SpriteFont A bitmap-based text rendering. This is a C++ version of the SpriteFont used for XNA Game Studio.
Effects A collection of ready-to-use common shaders. These are C++ versions of the BasicEffect, AlphaTestEffect, DualTextureEffect, EnvironmentMapEffect, and SkinnedEffect used for XNA Game Studio.
GeometricPrimitives Geometry helpers for common shapes, which are: Cube, Sphere, GeoSphere, Cylinder, Torus, and Teapot.
Model Draws simple meshes loaded from .CMO or .SDKMESH files.
CommonStates Factory for common combinations of rendering states as Direct3D 11 state objects. These are C++ versions modelled after the ‘public fields’ of BlendState, DepthStencilState, RasterizerState, and SampleState classes used for XNA Game Studio.
VertexTypes Collection of commonly used vertex buffer data structures with a input layout descriptions. These are C++ versions of VertexPositionColor, VertexPositionTexture, VertexPositionColorTexture, and VertexPositionNormalTexture structures used for XNA Game Studio.
DDSTextureLoader, WICTextureLoader, and ScreenGrab These are from the DirectXTex package.
SimpleMath Simplified C++ wrapper for DirectXMath.
MakeSpriteFont Generates .spritefont files. This is based on the Bitmap Font Maker Tool for XNA Game Studio.

This library can be used for Xbox One titles (after completing the procedure below), Windows 8/Windows 7/Windows Vista Direct3D 11 Win32 desktop applications, and Microsoft Store apps.

To enable the DirectXTK library on Xbox One

  1. Install DirectXTK from CodePlex: http://directxtk.codeplex.com.
  2. For XDK development open a Developer Command Prompt for Xbox One XDK and change the folder to DirectXTK\Src\Shaders. Then run “CompileShaders xbox”. This generates the Xbox One XDK shaders using the currently installed version of the Xbox One XDK.
  3. Add the project “DirectXTK_XboxOneXDK” (or “DirectXTK_XboxOneADK” for ADK development) to your solution.
  4. Add an Additional Include Directories property to your project of “DirectXTK\Inc”.
  5. Add a project-to-project Reference to the DirectXTK project.