This project has moved and is read-only. For the latest updates, please go here.
NEWS: This project is now hosted on GitHub This site is being maintained for now, but please move to using GitHub particularly as the CodePlex copy of the tutorials are a little dated.

This is the Getting Started tutorial for DirectX Tool Kit which introduces the reader to programming Direct3D 11 in C++.


This tutorial assumes the reader is familiar with the basics of C++ programming using Microsoft Visual C++, including writing code, building applications, and basic debugging. Coding conventions here will make use of C++11 language features such as auto, simple lambdas (aka anonymous functions), and the standard smart-pointer std::unique_ptr, but will generally be otherwise 'core' C++ (i.e. language features supported in Visual C++ 2010).
This tutorial does not assume prior experience with Direct3D, but the reader should be familiar with the basic graphics concepts for DirectX or OpenGL. That said, you can get a long way using DirectX Tool Kit without much in the way of graphics experience.

One thing that many C++ developers, particularly game developers, may not be all that familiar with is "C++ Exception Handling". This is distinct from "Structured Exception Handling" (SEH) which some developers have seen in the past, and can leave an unfavorable impression of C++ EH. On both ARM and x64 native platforms, C++ EH is very efficient, although the x86 32-bit implementation does have some quirks. In any case, DirectX Tool Kit uses C++ Exception Handling for most error conditions, just as the Standard Template Library (STL) does and the default behavior of the new operator. Note that Direct3D 11 and DirectX Tool Kit are not "WinRT" APIs, so we do not make use of the new C++/CX language extensions. DirectX Tool Kit is a 'pure' C++ library, which is why it's not directly usable by Visual Basic, C# or HTML+JavaScript applications.


These tutorials are written with game development in mind as the target application since games are an excellent fit for the 'immersive DirectX app' model. Keep in mind, however, that the majority of the functionality in the DirectX Tool Kit is applicable to DirectX graphics programming in general for both game and non-game applications.

Software Setup

For learning purposes, these instructions are going to focus on the following setup:
  • Visual Studio 2013 Community, Professional, Premium, or Ultimate (Update 4)
  • Windows 7 or Windows 8.x
We will be using a Win32 desktop application project template in order to support developers using Windows 7, but all these techniques and APIs apply to Windows Store apps, Windows phone 8.x, "Universal apps" for Windows 8.1 & Windows Phone 8.1, and Xbox One as well.


The basic game loop
Adding the DirectX Tool Kit


Sprites and textures
More tricks with sprites
Drawing text
Simple rendering
3D shapes
Rendering a model
Using skinned models
Using advanced shaders
Applying lightmaps
Creating custom shaders with DGSL
Writing custom shaders


Game controller input


Using the SimpleMath library
Basic game math
Collision detection
Mixing SimpleMath and DirectXMath


Adding the DirectX Tool Kit for Audio
Adding audio to your project
Creating and playing sounds
Using positional audio


Last edited Jul 28, 2015 at 7:50 PM by walbourn, version 34