The ancient NeHe OpenGL tutorials, ported to the Zig language.
Based largely on the C-based glfw 2 NeHe tutorials by Joseph Redmon (pjreddie@) with updates for glfw 3. Other useful base material from andrewrk/tetris.
Currently tested on Linux (Debian 12) with Zig version 0.15.2.
Older versions were tested on MacOS and FreeBSD. Some tweaking may be needed to get the latest version running, or to build on other OSes - contributions welcome.
You will need to install glfw.
brew install glfwOn MacOS, you will also need to install XCode in order to get the OpenGL framework.
apt install libglfw3-dev libglu1-mesa-devIn each LessonXX directory, you can build and run the given tutorial by running:
zig build runOn MacOS, you may run into linking problems with OpenGL. If this happens try:
ZIG_SYSTEM_LINKER_HACK=1 zig build runFrom Lesson 6:
- Should do error-handling in a more Zig-like way, and actually deal with gl initialization failing.
- All the lessons.
