Skip to content

winksaville/zig-3d-soft-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Soft engine written in zig

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.

Dependencies

Needs zig PR 1820: ziglang/zig#1820 so fn saturateCast in zig-misc works

Checkout

git clone --recurse-submodules https://github.com/winksaville/zig-3d-soft-engine

Build

zig build

Test individual components

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

Run

./3d-soft-engine

About

An attempt to create a 3D engine in software using zig.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published