This repo contains the code I wrote when reading the Learn OpenGL book using Zig.
The code is organized according to the parts and chapters in the book. For example, I_Getting_Started/4_1_hello_window
.
The shared libraries live in the libs
folder.
The code was tested using Zig 0.12.0-dev.1856+94c63f31f and above. It will keep up with the master version.
To run a particular sample, just go to its folder and run zig build run
.
LearnOpenGL_Zig % cd I_Getting_Started/4_1_hello_window
4_1_hello_window % zig build run
This repo depends on the following external libraries:
- mach_glfw: GLFW bindings for Zig.
- zig-opengl: used to generate the OpenGL bindings for Zig.
- stb-image.h: a single-file public domain library for image in C/C++.
- zmath: SIMD math library for game developers in Zig. It's replacement of glm for Zig.
- JoeyDeVries/LearnOpenGL: the official repo for code samples of the book. This repo tries to keep the structure and style as close as it.
- zig_learn_opengl: an existing repo for the code samples in Zig. This repo learns a lot from it, especially which Zig library to use.