This is an unofficial fork of the sample code repo for the second edition of Frank D. Luna's excellent book Introduction to 3D Game Programming with DirectX 12. No representation is made that the source code belongs to me, it's simply reproduced here so I can modify it for my use and remains the copyright of Frank D. Luna.
You'll need Visual Studio 2026 with the Desktop development with C++ and Game development with C++ Visual Studio workloads. Obviously, you also need to have a GPU that supports DirectX 12 for the samples to work correctly. Once you've satisfied these requirements, you should be able to open the intro-to-d3d12-second-edition.slnx file in Visual Studio and build all the projects. To run an individual project, make sure you set the Debugging > Working Directory project setting to $(ProjectDir)..\.. first to allow the binary to locate the necessary shader, texture and model files.
All projects have been updated to use the MSVC v145 toolset and retargeted to using the latest MSVC C++ standard. This required fixing the same compilation errors in C++20 mode that affected the first edition's source. For convenience, a solution file has been added into the Demos subdirectory that includes all the projects.
If you're a novice looking to learn game development, this book and repo is probably not the best place to start, and you might be better off looking at resources for building games in Unreal Engine or Unity. This repo is mainly useful for professional and amateur game engine and graphics programmers wanting to learn how to work with DirectX 12. Needless to say, building a 3D game or rendering engine is a lot of hard work, and this book really only touches on the DX12 rendering aspect of such an engine, without touching on things like design, sound, gameplay, etc, so don't expect to master game development purely using this resource.
- MSDN's Direct3D 12 Programming Guide
- Jeremiah van Oosten's DirectX 12 tutorial
- Braynzar Soft's DirectX 12 tutorials