Skip to content

Instantly share code, notes, and snippets.

#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <stdint.h>
#include <assert.h>
#define COBJMACROS
#pragma comment (lib, "dxguid")
#include <dxgi1_3.h>
#include <d3d11.h>
typedef struct {
// Requires Common.h and Common.c from: https://github.com/TheSpydog/SDL_gpu_examples
#include "Common.h"
#include <SDL3/SDL_main.h>
#include <stdint.h>
#include <assert.h>
int main(int argc, char **argv) {
Context context = { 0 };
int frameNum = 0;
uint64_t lastFrame = 0;
// Inspired by: https://github.com/nothings/stb/blob/master/stretchy_buffer.h
// Note: untested code, no overflow checks, no range checks!
printf(fmt cstring) int #Foreign("printf") #VarArgs
StretchyBufferHeader struct {
count int
capacity int
}