Skip to content

Instantly share code, notes, and snippets.

View CaptainKraft's full-sized avatar

Jeremiah Goerdt CaptainKraft

View GitHub Profile
@mmozeiko
mmozeiko / win32_d3d11.c
Last active December 4, 2025 23:57
setting up and using D3D11 in C
// example how to set up D3D11 rendering on Windows in C
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d11.h>
#include <dxgi1_3.h>
#include <d3dcompiler.h>
#include <dxgidebug.h>
@vurtun
vurtun / layout.c
Last active October 11, 2025 13:01
// --- Library --------------------------------------------------------------------------
#include <string.h>
#include <assert.h>
struct ui_box {int x,y,w,h;};
typedef unsigned long long ui_id;
struct ui_node {
int parent;
int lst, end, nxt;
int siz[2];
@d7samurai
d7samurai / .readme.md
Last active December 13, 2025 08:33
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and 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. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series: