{"id":13712788,"url":"https://github.com/craftlinks/zig_learn_opengl","last_synced_at":"2025-05-06T22:31:29.635Z","repository":{"id":124102753,"uuid":"588282127","full_name":"craftlinks/zig_learn_opengl","owner":"craftlinks","description":"Follow the Learn-OpenGL book using Zig","archived":false,"fork":false,"pushed_at":"2023-03-24T08:58:43.000Z","size":1580,"stargazers_count":118,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T16:14:50.879Z","etag":null,"topics":["graphics","opengl","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craftlinks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-12T18:56:19.000Z","updated_at":"2025-04-22T16:27:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"25c2db92-76cc-44f2-b8bf-46e14ed43c46","html_url":"https://github.com/craftlinks/zig_learn_opengl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftlinks%2Fzig_learn_opengl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftlinks%2Fzig_learn_opengl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftlinks%2Fzig_learn_opengl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftlinks%2Fzig_learn_opengl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftlinks","download_url":"https://codeload.github.com/craftlinks/zig_learn_opengl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779077,"owners_count":21802877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphics","opengl","zig"],"created_at":"2024-08-02T23:01:22.713Z","updated_at":"2025-05-06T22:31:29.584Z","avatar_url":"https://github.com/craftlinks.png","language":"Zig","readme":"# [**Learn OpenGL**](https://learnopengl.com/) using [Zig](https://ziglang.org/).\n\nWindowing library: [mach/glfw - Ziggified GLFW bindings](https://github.com/hexops/mach-glfw) by slimsag\n(Stephen Gutekanst).\n\nOpenGL bindings for Zig were generated by the [zig-opengl](https://github.com/MasterQ32/zig-opengl) project by MasterQ32 (Felix Queißner).\n\n[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. \n\nSample programs can be used together with the reference book: [Learn OpenGL - Graphics Programming](https://learnopengl.com/) by [Joey de Vries](http://joeydevries.com/#home).\n\n---\nZig Language installation [How-to instructions](https://ziglang.org/learn/getting-started/).\n\n---\n## **I. Getting Started**\n### Hello Triangle \n\n- [**hello_triangle**](src/getting_started/hello_triangle/): Minimal setup for drawing a trianlge on screen.\u003cbr /\u003e`zig build hello_triangle-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/hello_triangle\"\u003e\u003cimg src=\"src/getting_started/hello_triangle/image.png\" alt=\"hello triangle\" height=\"200\"\u003e\u003c/a\u003e\n- [**hello_rectangle**](src/getting_started/hello_rectangle/): Draw a rectangle efficiently with indexed rendering using the **'Element Buffer Object'**. \u003cbr /\u003e`zig build hello_rectangle-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/hello_rectangle\"\u003e\u003cimg src=\"src/getting_started/hello_rectangle/image.png\" alt=\"hello triangle\" height=\"200\"\u003e\u003c/a\u003e\n\n### Shaders\n- [**shaders**](src/getting_started/shaders/): Little programs that rest on the GPU \u003cbr /\u003e\n`zig build shaders-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/shaders\"\u003e\u003cimg src=\"src/getting_started/shaders/image.png\" alt=\"shaders\" height=\"200\"\u003e\u003c/a\u003e\n\n    [Shader](src/common/shader.zig) struct mirrors the C++ Shader Class in the book. \n\n### Textures\n- [**textures**](src/getting_started/textures/): Decorate objects with textures \u003cbr /\u003e\n`zig build textures-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/textures\"\u003e\u003cimg src=\"src/getting_started/textures/image.png\" alt=\"textures\" height=\"200\"\u003e\u003c/a\u003e\n\n### Transformations\n- [**Transformations**](src/getting_started/transformations/): Apply a transformation matrix to vertex data \u003cbr /\u003e\n`zig build transformations-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/transformations\"\u003e\u003cimg src=\"src/getting_started/transformations/image.png\" alt=\"transformations\" height=\"200\"\u003e\u003c/a\u003e\n\n### Coordinate Systems\n- [**Coordinate systems**](src/getting_started/coordinate_systems/): Model, View, Projection matrices \u003cbr /\u003e\n`zig build coordinate_systems-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/coordinate_systems\"\u003e\u003cimg src=\"src/getting_started/coordinate_systems/image.png\" alt=\"coordinate_systems\" height=\"200\"\u003e\u003c/a\u003e\n\n### Camera\n- [**Camera rotation**](src/getting_started/camera_rotate/): Camera rotation around world origin \u003cbr /\u003e\n`zig build camera_rotate-run`\n\n- [**Simple camera**](src/getting_started/simple_camera/): Fly-like camera \u003cbr /\u003e\n`zig build simple_camera-run`\n\n## **II. Lighting**\n\n### Basic Lighting\n- [**Basic Lighting**](src/getting_started/basic_lighting/): Phong lighting model \u003cbr /\u003e\n`zig build basic_lighting-run`\n\u003cbr /\u003e\u003ca href=\"src/getting_started/basic_lighting\"\u003e\u003cimg src=\"src/getting_started/basic_lighting/image.png\" alt=\"basic_lighting\" height=\"200\"\u003e\u003c/a\u003e","funding_links":[],"categories":["Multimedia \u0026 Graphics"],"sub_categories":["Graphics Library"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftlinks%2Fzig_learn_opengl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftlinks%2Fzig_learn_opengl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftlinks%2Fzig_learn_opengl/lists"}