This is my personal CPU-based 3D raster graphics engine that implements a minimal 3D graphics API. The intent of this project is to give me a better understanding of what implementations of graphics APIs such as OpenGL, Vulkan, and Direct3D do under the hood.
The only required external library is SDL2 (for window and user input management).
By default, Impromptu uses perspective projection with first-person camera controls.
I build the project with gcc
on Windows. The build command I use in development looks something like
gcc -pedantic -Wall -Werror -fgnu89-inline -std=c99 ^
main.c engine.c model.c vector3.c matrix4.c^
-I[Path to SDL2 includes] ^
-L[Path to SDL2 libraries] ^
-lSDL2 -lSDL2main -lmingw32 ^
-O2 ^
-o impromptu.exe
When running the program, make sure SDL2.dll
(can be found in the SDL2 link above) is in the same directory as the output executable.
In no particular order, here are some online resources I found helpful along the way: