# Day 3 of building my DirectX 12 and C++ rendering project on top of the Microsoft GDK template (Windows Desktop and Handheld), continuing my journey toward becoming a game engine programmer for the Xbox and PC ecosystem.

**URL:** <https://forums.unrealengine.com/t/day-3-of-building-my-directx-12-and-c-rendering-project-on-top-of-the-microsoft-gdk-template-windows-desktop-and-handheld-continuing-my-journey-toward-becoming-a-game-engine-programmer-for-the-xbox-and-pc-ecosystem/2873030>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP\
**Created:** [November 25, 2026, 11:30am UTC](https://forums.unrealengine.com/t/day-3-of-building-my-directx-12-and-c-rendering-project-on-top-of-the-microsoft-gdk-template-windows-desktop-and-handheld-continuing-my-journey-toward-becoming-a-game-engine-programmer-for-the-xbox-and-pc-ecosystem/2873030 "2026-11-25T11:30:33Z")\
**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 25, 2026, 11:30am UTC](https://forums.unrealengine.com/t/day-3-of-building-my-directx-12-and-c-rendering-project-on-top-of-the-microsoft-gdk-template-windows-desktop-and-handheld-continuing-my-journey-toward-becoming-a-game-engine-programmer-for-the-xbox-and-pc-ecosystem/2873030/1 "2026-11-25T11:30:33Z")

</div>

In this step-by-step walkthrough, we bring our indexed quad to life with real-time rotation and proper window aspect ratio handling via a dynamic Constant Buffer: - Declaring cbuffer ConstantBuffer : register(b0) in shaders.hlsl and multiplying vertex positions by worldViewProj - Defining a 256-byte aligned SceneConstantBuffer struct in Game.h with static\_assert verification - Updating the Root Signature with a Root CBV (D3D12\_ROOT\_PARAMETER\_TYPE\_CBV) in register b0 - Creating and persistently mapping a 256-byte upload buffer (m\_constantBuffer) in CreateDeviceDependentResources() - Computing world, view, and perspective projection matrices with DirectXMath and XMMatrixTranspose in Game::Update() - Binding the root constant buffer view via SetGraphicsRootConstantBufferView() before DrawIndexedInstanced() in Game::Render() - Unmapping and releasing constant buffer resources cleanly in OnDeviceLost() Follow my daily progress and portfolio here:

Video Day 3:[https://youtu.be/1mTJKW0oMu8](https://youtu.be/1mTJKW0oMu8)

[https://youtube.com/@lowlevelcode\_usa?si=AOu0PluZJtnguudQ](https://youtube.com/@lowlevelcode_usa?si=AOu0PluZJtnguudQ) #CPP #DirectX12 #MicrosoftGDK #DirectXMath #GameEngine #EngineProgramming #GameDev
