Skip to content

Instantly share code, notes, and snippets.

View CaptainKraft's full-sized avatar

Jeremiah Goerdt CaptainKraft

View GitHub Profile
@CaptainKraft
CaptainKraft / .minimal d3d11.md
Created December 12, 2022 15:30 — forked from d7samurai/.readme.md
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup & basic rendering primer / API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~215 LOC. No modern C++ / OOP / obscuring cruft. View on YouTube

hollowcube

Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup / rendering techniques.

@CaptainKraft
CaptainKraft / win32_d3d11.c
Created April 5, 2022 03:26 — forked from mmozeiko/win32_d3d11.c
setting up and using D3D11 in C
// example how to set up D3D11 rendering on Windows in C
// require Windows 7 Platform Update or newer Windows version
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d11.h>
#include <dxgi1_2.h>
#include <d3dcompiler.h>