Basic Triangle (Direct3D 12)
A minimal triangle rendering example that demonstrates command list creation and swap chain presentation.
View CodeDirectX is a collection of APIs for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. This page provides an overview of the core DirectX APIs, quick start guides, and code snippets.
Use the dotnet new winui template or the Visual Studio “DirectX App (Universal Windows)” template.
#include <d3d12.h>
#include <dxgi1_6.h>
#include <Windows.h>
int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) {
// Boilerplate omitted for brevity.
return 0;
}
Full Setup Guide