https://github.com/craftlinks/zig_learn_opengl
Follow the Learn-OpenGL book using Zig
https://github.com/craftlinks/zig_learn_opengl
graphics opengl zig
Last synced: 2 days ago
JSON representation
Follow the Learn-OpenGL book using Zig
- Host: GitHub
- URL: https://github.com/craftlinks/zig_learn_opengl
- Owner: craftlinks
- License: other
- Created: 2023-01-12T18:56:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-24T08:58:43.000Z (about 2 years ago)
- Last Synced: 2025-04-26T16:14:50.879Z (13 days ago)
- Topics: graphics, opengl, zig
- Language: Zig
- Homepage:
- Size: 1.51 MB
- Stars: 118
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - craftlinks/zig_learn_opengl - OpenGL book using Zig. (Graphics Library / Zigged Project)
README
# [**Learn OpenGL**](https://learnopengl.com/) using [Zig](https://ziglang.org/).
Windowing library: [mach/glfw - Ziggified GLFW bindings](https://github.com/hexops/mach-glfw) by slimsag
(Stephen Gutekanst).OpenGL bindings for Zig were generated by the [zig-opengl](https://github.com/MasterQ32/zig-opengl) project by MasterQ32 (Felix Queißner).
[zstbi](https://github.com/michal-z/zig-gamedev/tree/main/libs/zstbi) - stb image bindings, [zmath](https://github.com/michal-z/zig-gamedev/tree/main/libs/zmath) - SIMD math library, provided by [Michal Ziulek](https://github.com/michal-z), part of the [zig-gamedev](https://github.com/michal-z/zig-gamedev) project.
Sample programs can be used together with the reference book: [Learn OpenGL - Graphics Programming](https://learnopengl.com/) by [Joey de Vries](http://joeydevries.com/#home).
---
Zig Language installation [How-to instructions](https://ziglang.org/learn/getting-started/).---
## **I. Getting Started**
### Hello Triangle- [**hello_triangle**](src/getting_started/hello_triangle/): Minimal setup for drawing a trianlge on screen.
`zig build hello_triangle-run`![]()
- [**hello_rectangle**](src/getting_started/hello_rectangle/): Draw a rectangle efficiently with indexed rendering using the **'Element Buffer Object'**.
`zig build hello_rectangle-run`### Shaders
- [**shaders**](src/getting_started/shaders/): Little programs that rest on the GPU
`zig build shaders-run`[Shader](src/common/shader.zig) struct mirrors the C++ Shader Class in the book.
### Textures
- [**textures**](src/getting_started/textures/): Decorate objects with textures
`zig build textures-run`### Transformations
- [**Transformations**](src/getting_started/transformations/): Apply a transformation matrix to vertex data
`zig build transformations-run`### Coordinate Systems
- [**Coordinate systems**](src/getting_started/coordinate_systems/): Model, View, Projection matrices
`zig build coordinate_systems-run`### Camera
- [**Camera rotation**](src/getting_started/camera_rotate/): Camera rotation around world origin
`zig build camera_rotate-run`- [**Simple camera**](src/getting_started/simple_camera/): Fly-like camera
`zig build simple_camera-run`## **II. Lighting**
### Basic Lighting
- [**Basic Lighting**](src/getting_started/basic_lighting/): Phong lighting model
`zig build basic_lighting-run`