• Stars
    star
    3
  • Rank 3,963,521 (Top 79 %)
  • Language
    Zig
  • License
    The Unlicense
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

zig-explore

Explore how to use zig
Zig
8
star
2

baremetal-hi

A trivial baremetal app that prints "Hi".
CMake
7
star
3

baremetal-x86_64

C
6
star
4

nim-benchmark

A benchmarking suite for Nim programs
HTML
6
star
5

Kaleidoscope-in-cpp

Kaleidoscope: A toy language LLVM front end in cpp
C++
3
star
6

exper-code-coverage

Experiment with code coverage techniques for rust
Rust
3
star
7

zig-geometry

Mathematical routines for 3D geometry
Zig
2
star
8

cq-box-with-dovetail-lid

A box with dovetail lid in cadquery
Python
2
star
9

llvmwasm-builder

Build llvm clang, binaryen and wabt
Makefile
2
star
10

zig-benchmark

Explore making a zig benchmark framework
Assembly
2
star
11

nim-queues

Investigate thread safe queues for Nim
Nim
2
star
12

test-mpscfifo-intrusive

Intrusive Multiple Producer Single Consumer FIFO
C
2
star
13

fuchsia

Mirror of Fuchsia https://fuchsia.googlesource.com/fuchsia
C++
1
star
14

baremetal-po-serial

Baremetal startup code for x86_64 based on Philipp Opperman's code but outputs to serial port.
Assembly
1
star
15

sel4-newlibs-manifest

A repo manifest for testing the newlibs
1
star
16

kaleidoscope-cpp

LLVM tutorial kaleidoscope language in cpp
C++
1
star
17

test-mpscfifo

C
1
star
18

DavrousSoftEngineTS

David Rousset's SoftEngine in Typescript
TypeScript
1
star
19

box-fun-can-return-this-counter

An example of a Box Viewpoint
Pony
1
star
20

test-meson-custom_target

Test custom_target using Meson build system
Shell
1
star
21

freetype2-example1

FreeType2 example1
C
1
star
22

zedboard-hello-world

A Zedboard Hello World project.
C
1
star
23

ethereum-string-event

A simple contract that issues an event
JavaScript
1
star
24

flutter_filledstacks_movable_widgets

From Dane Mackier https://www.filledstacks.com/snippet/widget-tricks-create-movable-stack-widgets/
Makefile
1
star
25

babylon-typescript-example

A proposal for the Typescript example in the Babylon js documenation
JavaScript
1
star
26

bullinaria-nn

A Simple Artificial Neural Network in C
C
1
star
27

sel4-minimal-helloworld

A minimal sel4 helloworld application
C
1
star
28

cq-thread-experiments

Experiment with making threads in cadquery
Python
1
star
29

gcc-5.2.0

This is gcc 5.2.0 to debug travis-ci
C
1
star
30

zig-futex-over-optimization

An example of zig over optimizing and causing a debug build to be faster than release builds
Assembly
1
star
31

test-mpscringbuff

A MPSC Ring Buffer
C
1
star
32

rust-udp-p2p-chat

Testing UDP connections in a super simple chat app
Rust
1
star
33

rust-binance-cli

Automatically sell all assets owned by the user on binance.us except USD, USDT plus a minimum of BNB is kept.
Rust
1
star
34

nim-exploration

Exploring nim
Nim
1
star
35

expr-cross-compile-rpi-4

Experiment cross compiling from Arch Linux to Raspberry-Pi 4
Shell
1
star
36

test-emcc-and-wasm-link

Capture what I learned trying to use emcc and wasm-link
Makefile
1
star
37

c-mpscfifo

C
1
star
38

c-empty-struct

Explore empty struct in C
C
1
star
39

android-BleTest1

An Android App for exploring BLE
Java
1
star
40

test-nn-wasm

An artificial neural network library targeting WebAssembly
C
1
star
41

sr-counter

An Actor that implement Increments and Read using Stateright
Rust
1
star