Learning Windows 8 Game Development
上QQ阅读APP看书,第一时间看更新

Installing DirectXTK

We will use NuGet, a development package manager that comes with Visual Studio 2012 to install DirectXTK. Before this can happen, we need to ensure it is up-to-date using the Extensions and Updates dialog, found in the Tools menu. (Select Updates on the left side of the dialog.) Once it is up-to-date, we can use NuGet to install C++ packages. Right-click on your game project in Visual Studio and choose Manage NuGet packages. This will bring up the management dialog, where we can search for new packages. Search for DirectXTK and install the DirectX Tool Kit when it appears.

Once it finishes downloading, it will integrate with your project, allowing you to include any of the header files using the #include <file.h> directive.

If you want further information about the toolkit, visit http://directxtk.codeplex.com, which will let you access the source code as well as the feature list for the library. For this project we will only be using the following types:

  • SpriteBatch
  • SpriteFont

Most of the other features relate to 3D games and can be ignored.