All chapters in Introduction to DirectX 12

12 chapters in this book

Introduction

Why DX12 over DX11, what hardware and software you'll need, and an overview of what this series covers.

Read →

Prerequisites and Setup

What to install before writing a line of DX12 code: Visual Studio, the right workloads, and the Windows SDK. CMake comes later — it's not needed until we refactor the project structure.

Read →

Overview of Win32 Apps

Before we touch DirectX, we need a window. Here's a tour of how Win32 desktop apps are structured — entry points, message loops, and the event-driven model.

Read →

Create a Win32 Window

Step-by-step: register a window class, create the window with CreateWindowEx, write a message loop, and end up with a clean blank surface ready for DirectX 12.

Read →

Refactor the Win32 Window into a Class

Turn the procedural Win32 window setup into a small C++ Window class, split the project into files, and prepare the codebase for DirectX 12.

Read →

DXGI: Factory and Adapter

Why DXGI exists, how it separates presentation from rendering, and how to create a factory, enumerate GPU adapters, and pick the right hardware device.

Read →

The D3D12 Device

Create the D3D12 device from the DXGI adapter, enable the debug validation layer before device creation, pick a feature level, and wrap everything in a small class.

Read →

The Command Queue

Understand why DX12 requires explicit command queues, create a direct queue for rendering, and learn why DXGI needs this queue before it can build a swap chain.

Read →

The Swap Chain

Create the DXGI swap chain using the factory, command queue, and window handle. Understand double buffering, the flip model, tearing support, and how to retrieve back buffer pointers.

Read →

Descriptor Heaps and Render Target Views

Understand why DX12 requires descriptors, create an RTV descriptor heap for the swap chain back buffers, and learn how descriptor handle arithmetic works.

Read →

Command Allocators and Command Lists

Understand the allocator and list model for recording GPU work, create one allocator per back buffer, create a reusable command list, and learn the reset pattern used every frame.

Read →

First Frame: Clear and Present

Write the first real render loop: transition the back buffer with a resource barrier, clear it to a colour, submit to the GPU, present, and wait with a fence. The window turns solid blue.

Read →