This is a first attempt by a person with no experience in creating a 3D engine. So take everything you see with a huge grain of salt. But if you have suggestions feel free to raise an issue, provide a PR or contact me.
The engine is based on David Rousset's tutorial. Plus math3d from Andrew Kelly's Tetris with additions based on SharpDx.
Also the backend for creating Windows and displaying bitmaps uses Marc Tiehuis's sdl2 and the scribling code is based on Daniel D'Agostino SDL2 Pixel Drawing tutorial and the code is here.
Needs zig PR 1820: ziglang/zig#1820 so fn saturateCast
in zig-misc works
- Git Submodules
- zig
- SDL2
- zig-sdl2 brought in as a submode and created by Marc TieHuis.
git clone --recurse-submodules https://github.com/winksaville/zig-3d-soft-engine
zig build
zig test --test-filter "camera" src/camera.zig
zig test --test-filter "mesh" src/mesh.zig
zig test --test-filter "inputEvents" src/input_events.zig
zig test --test-filter "math3d" src/math3d.zig
zig test --test-filter "window" --library c --library SDL2 src/window.zig
./3d-soft-engine