Crayte (pronounced ācreateā) (see how funny I am) is a real-time 3D renderer written in C. It uses SDL2 for windowing and input handling, with no other dependencies.

why i built it
i needed a mini-project for my computer graphics course. the kind of thing you start because the syllabus says you should, except i actually got into it. wrote every line myself. my own hands + keebs, no gpt shenanigans. funnily enough thatās rare to come by now a days. agents werenāt as powerful when i started, which in hindsight was a blessing because i had to figure out why my cube looked like a trapezoid the hard way.
right now it displays a 3D cube using parallel projection. it runs a basic game loop that handles input and renders frames to a color buffer. thatās the core functionality. the future plan, once i am motivated enough, is to add .obj file loading so i can render more than just a sad rotating box.
what i used
plain C (C99 standard). SDL2 for windowing and input. CMake (>= 3.10) with pkg-config to make building less painful. no external math librariesājust vector structs for 2D and 3D operations, handwritten, probably with bugs.
how it went
started with basic setup commits: a Makefile, a game loop, vector struct definitions. from there things grew slowly. vector math functions (dot products, normalization, all the linear algebra i thought i understood but clearly didnāt). parallel projection logic for rendering 3D geometry to 2D screen space. a color buffer system with garbage collection so i wouldnāt leak memory everywhere. a debug grid because without it i couldnāt tell if the renderer was broken or if my math was.
the build system evolved from a simple Makefile to CMake because i got tired of manually linking SDL2 differently on macOS and linux. now it builds cleanly across platforms, or at least it did the last time i checked.
the codebase has roughly 18ish commits from init to where it is now. working renderer, separate source files for display logic, builds with CMake. small, readable, not a production engine. just a learning project that happens to compile and run.
mkdir -p build && cd build
cmake ..
cmake --build . --config Release
./bin/crayteon macOS with Homebrew, SDL2 installs via brew install sdl2. CMakeās pkg-config integration finds it automatically.
who is it for
i didnāt have any āstakeholderā in mind while building it. started because it seemed fun. if youāre curious about how 3D rendering works at a low level, how vectors get projected, how a color buffer functions, how a game loop drives a rendererāthis is a small, readable codebase to dig through. itās not a production engine. itās not going to compete with unity. itās a thing i made because i wanted to see if i could.
Built with C and SDL2 (and with patience and love)