https://go.microsoft.com/fwlink/?LinkId=248929
The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++.
For an overview of the project, see these blog posts: March 2012, January 2013, September 2014, August 2015, July 2016, September 2021, and October 2021.
For an overview of DirectX Tool Kit for Audio, see these blog posts: December 2013 and May 2020.
DirectXTK library
DirectX 11
DirectX 11 is supported on Windows 7, Windows 8.1, Windows 10, and Windows 11. Use of DirectX 11 for beginners is highly recommended.
DirectX 12
A version of DirectX Tool Kit for DirectX 12 is available on GitHub. DirectX 12 is an expert API for Windows 10 / Windows 11 which builds on knowing the ins & outs of DirectX 11. Both DirectX 11 and DirectX 12 provide access to the same graphics hardware features, but drive the hardware in different ways which can allow a well-optimized DirectX 12 engine to achieve much lower CPU overhead than in DirectX 11.
Note that advanced hardware features like Shader Model 6, DirectX Raytracing, Amplification & Mesh Shaders, and other "DirectX Ultimate" features do in fact require DirectX 12 as they are not exposed in DirectX 11. The statement above is still 100% true for the core graphics functionality used by DirectX Tool Kit.
NuGet
DirectX Tool Kit is also available from the NuGet Gallery:
- Windows desktop app using VS 2019 or VS 2022
- Windows desktop app using VS 2019 or VS 2022 for Windows 10
- Universal Windows Platform apps using VS 2019 or VS 2022
vcpkg C++ Package Manager
DirectX Tool Kit has a vcpkg installation port as well.
Porting from D3DX
See this post for a complete listing of D3DX equivalents.
Support
For questions, consider using Stack Overflow with the directxtk tag, or the DirectX Discord Server in the dx9-dx11-developers channel.
For bug reports and feature requests, please use GitHub issues for this project.
Security
The DirectX Tool Kit library functions are invoked by client code. While effort is made to validate parameters and arguments in code, the client code is responsible for validating any relevant user-input. The primary security focus for DirectXTK is the image loading code and audio wave file loaders which process potentially untrusted content from disk/memory. When using Windows Imaging Component (WIC), that component has a strong security guarantee and validation story for security vulnerabilities. For the custom DDS, WAV, and XWB codecs, significant hardening and validation has been applied and the code is subject to file-fuzzing.
This project is subject to Microsoft's Open Source Security Policy.
For a list of known vulnerabilities, see GitHub.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
Tests for new features should also be submitted as a PR to the Test Suite repository.
Information on coding-style can be found here.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Credits
The DirectX Tool Kit is the work of Shawn Hargreaves and Chuck Walbourn, with contributions from Aaron Rodriguez Hernandez and Dani Roman.
Thanks to Shanon Drone for the SDKMESH file format.
Thanks to Adrian Tsai for the geodesic sphere implementation.
Thanks to Garrett Serack for his help in creating the NuGet packages for DirectX Tool Kit.
Thanks to Roberto Sonnino for his help with the CMO
, DGSL rendering, and the VS Starter Kit animation.
Thanks to Pete Lewis and Justin Saunders for the normal-mapped and PBR shaders implementation.
Thanks to Andrew Farrier and Scott Matloff for their on-going help with code reviews.
For Use
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 1
- Xbox One
Architecture
- x86
- x64
- ARM64
For Development
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- MinGW 12.2, 13.2
- CMake 3.20
Related Projects
DirectX Tool Kit for DirectX 12
Tools
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.