Learn OpenGL using Zig.
Windowing library: mach/glfw - Ziggified GLFW bindings by slimsag (Stephen Gutekanst).
OpenGL bindings for Zig were generated by the zig-opengl project by MasterQ32 (Felix Queißner).
zstbi - stb image bindings, zmath - SIMD math library, provided by Michal Ziulek, part of the zig-gamedev project.
Sample programs can be used together with the reference book: Learn OpenGL - Graphics Programming by Joey de Vries.
Zig Language installation How-to instructions.
- hello_triangle: Minimal setup for drawing a trianlge on screen.
zig build hello_triangle-run
- hello_rectangle: Draw a rectangle efficiently with indexed rendering using the 'Element Buffer Object'.
zig build hello_rectangle-run
-
shaders: Little programs that rest on the GPU
zig build shaders-run
Shader struct mirrors the C++ Shader Class in the book.
- textures: Decorate objects with textures
zig build textures-run
- Transformations: Apply a transformation matrix to vertex data
zig build transformations-run
- Coordinate systems: Model, View, Projection matrices
zig build coordinate_systems-run
-
Camera rotation: Camera rotation around world origin
zig build camera_rotate-run
-
Simple camera: Fly-like camera
zig build simple_camera-run
- Basic Lighting: Phong lighting model
zig build basic_lighting-run