Skip to content

bbeltza/DirectX12-Triangle-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello

The DirectX 12 Triangle

Hey, this is my first time using Direct3D 12 and making the typical Hello Triangle with it in order to learn the API.

It was originally made in 3 days from February 24th to 27th of this year (2026), It's my second graphics API!! (After some basic OpenGL...)

Don't expect the parts of this code to be good at all, I followed the official DirectX 12 HelloTriangle sample. I indeed think that there're lots of parts that can be improved (A few examples being, removing the usage of D3DCompiler and just compiling the HLSL shaders to DXBC/DXIL at compile time, improving fences and not wait inefficiently for the previous frame to complete, maybe making the triangle's vertex buffer be in the GPU's default memory, using an sRGB render target view instead of a dumb linear one...)

This is really not a clone of the HelloWorld sample, but I kind of didn't know what I was doing, however I pretty much became able to understand the different concepts (that they don't teach you in the GL) and use them in a more proper way if we can say that (See the SRE d3d12 backend, it's single-source-file, and I still see some flaws in the architectural decisions I've made, but it may show how this API I've come to practice, and still has improvements made...)

This will just remain archived, I don't have any plans on updating the repository, apart from this README.md. Knowing DirectX 12 really made me into graphics and GPU programming in general a lot! Being able to later on learn the older DirectX 11, and Vulkan... (There, two public projects using Vulkan! 1 and 2)

Goodbye now (Just one more thing, building was done with MSVC (You obviously need the Windows SDK, and one that supports d3d12 and dxgi 1.4), and CMake)

About

A triangle in DirectX12, nothing more... Made between the February 24th and 27th (2026), left barely touched (More info soon)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors