2024-08-13 00:29:39 +00:00
|
|
|
# 3D Toys
|
|
|
|
|
|
|
|
Everything in here is a little sample program or otherwise which
|
|
|
|
uses [haloo3d](https://github.com/randomouscrap98/haloo3d) and
|
2024-08-22 06:02:37 +00:00
|
|
|
[unigi](https://git.lumen.sh/Fierelier/unigi). It's all software
|
2024-09-21 04:38:46 +00:00
|
|
|
rendered, but you'll need to get sdl2 so it can render to screen.
|
2024-08-13 00:29:39 +00:00
|
|
|
|
|
|
|
The libraries required are set as submodules, so you can pull them
|
2024-08-22 06:02:37 +00:00
|
|
|
when cloning with:
|
|
|
|
|
|
|
|
```
|
2024-08-24 05:09:14 +00:00
|
|
|
git clone --recurse-submodules https://git.lumen.sh/haloopdy/3dtoys.git
|
2024-08-22 06:02:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Or if you already cloned, you can do this after the fact:
|
2024-08-13 00:29:39 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
git submodule update --init
|
|
|
|
```
|
|
|
|
|
2024-08-22 06:02:37 +00:00
|
|
|
Then, to build any example, just do `make name.exe`. For example, to
|
|
|
|
build maze.c, you would do
|
|
|
|
|
|
|
|
```
|
|
|
|
make maze.exe
|
|
|
|
./maze.exe
|
|
|
|
```
|
2024-08-13 00:29:39 +00:00
|
|
|
|
2024-08-24 05:09:14 +00:00
|
|
|
If you're having trouble building, you can try to force past the warnings (they're usually nothing):
|
|
|
|
```
|
|
|
|
make FORCE=1 maze.exe
|
|
|
|
```
|
|
|
|
|
2024-08-13 01:21:18 +00:00
|
|
|
## Unigi
|
2024-08-13 00:29:39 +00:00
|
|
|
|
2024-09-21 04:38:46 +00:00
|
|
|
Unigi is a small library and is built manually using the 3dtoys makefile.
|
|
|
|
You can tinker around with Unigi if you like; it has its own make system,
|
|
|
|
but I'm not sure what is required. The parts that are required for 3dtoys
|
|
|
|
are handled with the 3dtoys makefile.
|
2024-08-13 01:21:18 +00:00
|
|
|
|
2024-08-13 02:03:55 +00:00
|
|
|
Unigi expects some kind of graphics backend to run. In this case,
|
2024-09-21 04:38:46 +00:00
|
|
|
our samples use SDL2, so you'll need to get that.
|
2024-08-13 02:03:55 +00:00
|
|
|
|
2024-08-13 01:21:18 +00:00
|
|
|
## Haloo3d
|
|
|
|
|
2024-08-13 02:03:55 +00:00
|
|
|
You can compile haloo3d using the makefile provided in the library
|
|
|
|
repo, or include the .h and .c files directly into the main
|
|
|
|
translation unit like unigi currently expects.
|
2024-08-13 01:21:18 +00:00
|
|
|
|
|
|
|
For these samples, they expect you to build the `haloo3d_full.a`
|
|
|
|
library using `make full` in the haloo3d submodule. For convenience,
|
|
|
|
the makefile for the samples assumes you are using the submodule
|
|
|
|
and runs make in there for you.
|
2024-08-13 02:03:55 +00:00
|
|
|
|