# Day 4 – First 3D Cube | DirectX 12 + C++ + Microsoft GDK

**URL:** <https://forums.unrealengine.com/t/day-4-first-3d-cube-directx-12-c-microsoft-gdk/2873411>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP\
**Created:** [November 26, 2026, 11:13am UTC](https://forums.unrealengine.com/t/day-4-first-3d-cube-directx-12-c-microsoft-gdk/2873411 "2026-11-26T11:13:52Z")\
**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 26, 2026, 11:13am UTC](https://forums.unrealengine.com/t/day-4-first-3d-cube-directx-12-c-microsoft-gdk/2873411/1 "2026-11-26T11:13:52Z")

</div>

**Day 4 – First 3D Cube | DirectX 12 + C++ + Microsoft GDK**

Today I moved from a 2D quad to my first rotating 3D cube in my DirectX 12 rendering project.

Implemented:

- Depth testing with a Z-buffer.

- 24 vertices to keep each cube face independently colored.

- 36 indices for indexed triangle rendering.

- Clockwise winding and back-face culling.

- X/Y axis rotation using DirectXMath.

- `DrawIndexedInstanced()` for rendering the cube.

- Link video Cube 3D in Direct x12 and GDK XBOX AND PC:[https://youtu.be/SMhdcIkVhiI](https://youtu.be/SMhdcIkVhiI)

The project is built on top of the Microsoft GDK template for Windows Desktop and Handheld.

Continuing to explore low-level graphics programming, rendering pipelines, and the foundations of game engine development with C++ and DirectX 12.

Next step: keep building and understanding every layer of the rendering pipeline.

#DirectX12 #CPlusPlus #GraphicsProgramming #MicrosoftGDK #GameDevelopment #Rendering #GameEngine
