This project is a lightweight 3D flight demo in C++ using the DirectX 12 graphics API. Developed as a learning exercise, it focuses on the CPU-side setup of the D3D12 rendering pipeline. The demo also implements design patterns for the game-specific systems such as a command queue for actions and scene stack management.
This focuses on the CPU-side setup and execution of the DirectX 12 rendering pipeline, covering five core stages from device initialization to rendering.
⚠️ Note: It does not detail GPU pipeline internals like shading or rasterization.
Initialization stages 1-5, are all executed once within Game::Initialize():
Called once by D3DApp::Initialize(). It creates the graphics device and sets up communication with the GPU. It selects the best graphics adapter and initializes device resources like descriptor sizes (used to access GPU resources) and multisampling support (for anti-aliasing).
Stage 2 - Graphics Pipeline Configuration
What is it?
This stage defines how rendering is performed by configuring the GPU pipeline. It prepares the root signature, compiles shader code, and creates Pipeline State Objects.
Compiles HLSL shader code (VS/PS) and tells the GPU how to read each vertex’s data (e.g., a position is 3 floats, texture coordinates are 2 floats, etc.).
Creates Pipeline State Objects that define the full rendering behavior — including shaders, how triangles are rasterized, how pixels are blended, and depth settings.
Stage 3 - Resource Asset Setup
What is it?
This stage prepares the resources that will be used during rendering; it loads texture data, defines material properties, and sets up the descriptor heap that allows shaders to access those resources.
Allocates a set of resources for each frame (e.g., constant buffers and command allocators) to let the CPU prepare upcoming frames while the GPU works on the current one.
Conclusion
This project applies core DirectX 12 concepts through a clear, step-by-step pipeline setup. Beyond rendering, it applies systems like command queue for actions and scene stack management, enabling the systematic development and implementation of scalable 3D applications in C++. It served as a strong entry point into low-level graphics programming and engine architecture design.