Index

zydeco / fractal

Experiment in graphics programming, C++, OpenGL, simulation techniques.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
1209 Dec 2023 13:511467546Update READMEJosh Stockin111G

Blob @ zydeco / README.md

text/plain2170 bytesdownload raw
1## Zydeco ([Fractal tag](https://joshstock.in/blog/opengl-fractal-explorer))
2
3Hobby project/experiment in C++, graphics programming, and world generation.
4
5### Building
6
7Run `./zydeco.sh` to compile, build, and run. Requires `CMake` and a
8`C++20`-capable compiler, as well as the dependencies below. Executable is
9outputted at `build/zydeco` in the project root directory.
10
11Zydeco depends upon the following C/C++ libraries:
12
13| Library | Purpose | Source |
14| ------- | ------- | ------ |
15| `fmt` | String formatting for debug output messages | `libfmt-dev` |
16| `cpptrace` | Producing stack traces for fault output | [GitHub](https://github.com/jeremy-rifkin/cpptrace) |
17| `SDL2` | Cross-platform solution for creating and managing windows, OpenGL contexts | `libsdl2-dev` |
18| `GL` | OpenGL | `libgl-dev` |
19| `gl3w` | OpenGL loader with extensions enabled | [GitHub](https://github.com/skaslev/gl3w/blob/master/gl3w_gen.py) |
20| `imgui` | Immediate-mode GUI, used for debug menus | [GitHub](https://github.com/ocornut/imgui) (docking branch) |
21
22**Notes on installing dependencies:**
23
24* `cpptrace` is included by `CMakeLists.txt` as a system-wide dependency. You can
25either install it this way by the instructions in the linked repo, or remove
26its use in `src/util/Fault.cpp` and the requirement in `CMakeLists.txt`.
27* **`gl3w` should be run in a new directory `lib/gl3w` with `python3 gl3w_gen.py --ext`**
28* Install imgui with `git clone --branch docking --single-branch --depth=1 https://github.com/ocornut/imgui.git` to `lib/imgui`
29
30Depending on how your package manager installed SDL2, there might be a
31disparity for SDL2 `#include`s between imgui and this application. If this is
32the case, you may need to manually update imgui or this source code to add or
33remove "SDL2/" in `<SDL2/sdl_file_name.h>`, depending on where your package
34manager installed things.
35
36
37### Source Code
38
39It's not as pretty as I made it look in the article. OpenGL abstractions in
40`src/render`. Fractal application in `src/game/Mandelbrot.cpp`. Shaders in
41`include/render/shaders`. If you're looking to try out new z-transforms, you'll
42want to modify `include/render/shaders/fractal.cs.glsl`.
43
44