Skip to content

simstim-star/DirectX12-HelloTriangle-in-C

Repository files navigation

DirectX12 Hello Triangle in C

This is an adaptation of the official D3D12HelloWorld HelloTriangle using C.

Also check my DirectX-Graphics-Samples-in-C, where I intend to port all oficial examples to C.

This was done for educational purposes, in order to learn better about COM and DirectX.

How to build (MSVC)

Run the following with CMake:

cmake -B build-msvc -S . -G "Visual Studio 17 2022"
cmake --build build-msvc

This will generate a folder called build-msvc with the Visual Studio Solution and the project files.

You can run it to see the iconic "HelloTriangle" below:

image

How to build (GCC)

You can also build with GCC:

cc -mwindows *.c -ldxgi -ld3dcompiler -ld3d12 -ldxguid

About

Adaptation of the official DirectX12 HelloTriangle example using C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published