DirectX APIs Reference

DirectX 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.

Overview
Getting Started
Samples
Reference

Core DirectX APIs

Quick Start

Use the dotnet new winui template or the Visual Studio “DirectX App (Universal Windows)” template.

Prerequisites

  1. Windows 10 version 1809 or newer.
  2. Visual Studio 2022 with the Desktop development with C++ workload.
  3. Windows 10 SDK (10.0.19041.0 or later).

Minimal Hello‑Triangle (C++)

#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

Sample Projects

Basic Triangle (Direct3D 12)

A minimal triangle rendering example that demonstrates command list creation and swap chain presentation.

View Code

2D Canvas (Direct2D)

Draw shapes, text, and images using Direct2D and DirectWrite.

View Code

API Reference Links

Discussion