# Day 9 of building TitanEngine from scratch in C++20 and raw DirectX 12 — zero wrappers, no helper frameworks.

**URL:** <https://forums.unrealengine.com/t/day-9-of-building-titanengine-from-scratch-in-c-20-and-raw-directx-12-zero-wrappers-no-helper-frameworks/2859520>\
**Category:** C++\
**Tags:** unreal-engine, CPP\
**Created:** [November 20, 2026, 11:17am UTC](https://forums.unrealengine.com/t/day-9-of-building-titanengine-from-scratch-in-c-20-and-raw-directx-12-zero-wrappers-no-helper-frameworks/2859520 "2026-11-20T11:17:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinpc\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kevinpc_1/32/1215238_2.png) [@kevinpc\_1](https://forums.unrealengine.com/u/kevinpc_1)\
**Post date:** [November 20, 2026, 11:17am UTC](https://forums.unrealengine.com/t/day-9-of-building-titanengine-from-scratch-in-c-20-and-raw-directx-12-zero-wrappers-no-helper-frameworks/2859520/1 "2026-11-20T11:17:45Z")

</div>

In this episode, we move from a single triangle to indexed quad geometry by introducing an Index Buffer (`D3D12_INDEX_BUFFER_VIEW`), `DXGI_FORMAT_R16_UINT`, and `DrawIndexedInstanced`, while keeping our per-frame Constant Buffer horizontal oscillation from Day 8 intact. What we cover in Day 9: - Why duplicating shared vertices across triangles does not scale in a game engine - Defining 4 unique quad vertices and 6 indices (`uint16_t`) - Creating the Index Buffer resource and uploading index data via `Map` / `memcpy` / `Unmap` - Configuring `D3D12_INDEX_BUFFER_VIEW` and binding it with `IASetIndexBuffer` - Rendering with `DrawIndexedInstanced` alongside our per-frame Constant Buffer (`b0`) Timestamps: 00:00 - Intro & Day 8 Recap 01:15 - Unique Vertices vs. Index Buffer (`uint16_t`) 03:00 - Creating & Mapping the Index Buffer in DirectX 12 05:30 - `D3D12_INDEX_BUFFER_VIEW` &

Link video Day 9:[https://youtu.be/jHTWAxLzpJA](https://youtu.be/jHTWAxLzpJA)

`DrawIndexedInstanced` 07:45 - Live Demo & Horizontal Offset Bounds Tech Stack: C++20, DirectX 12, DXGI 1.6, HLSL (Shader Model 5.0), Win32 #DirectX12 #CPP #GameEngine #GraphicsProgramming #TitanEngine
