• Stars
    star
    129
  • Rank 269,802 (Top 6 %)
  • Language
    Zig
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

https://learnopengl.com tutorials ported to zig

Zig Learn OpenGL

Learn OpenGL tutorials ported to the zig programming language. This repo follows the chronological order of the website, separating out the same functionality into separate files. The repository is intended to serve as a demonstration of how to use OpenGL with zig, both in user code, and with the zig build system.

Currently the "Getting Started" and "Lighting" sections have been ported in full, and I've also ported the ibl specular implementation in the PBR section for a bit of eyecandy.

Containers screenshot

Dependencies

  • GLAD (vendored)
  • STB (vendored)
  • GLFW (byo)

All dependencies except for GLFW are vendored under deps/. For GLFW, install using your OS package manager, or if using windows, install using something like vcpkg and edit the paths in build.zig.

Running

Check build.zig for the full list of implemented stages, to run the relevant stage, just run its zig build command, for example:

zig build hello_triangle    # Renders a colorful triangle
zig build camera            # Renders a scene with many boxes and a camera
zig build multiple_lights   # Renders the same scene but with diffuse/specular maps and multiple lights

Stability

My intention is to keep this repo up to date with the language. This has been tested and works with:

  • 0.5.0+d972d1c94

More Repositories

1

neuroevolution

Replication of Uber Neuroevolution paper
Python
46
star
2

atari-leaderboard

A leaderboard of human and machine performance on the Arcade Learning Environment (ALE).
22
star
3

seer

Time series forecasting microservice
Go
21
star
4

auto-encoding-variational-bayes

Replication of "Auto-Encoding Variational Bayes" (Kingma & Welling, 2013)
Python
19
star
5

WebGPU.jl

Julia bindings and native wrapper for the gfx webgpu implementation
C
12
star
6

RayTracing.jl

Ray tracing in one weekend in Julia
Julia
9
star
7

normal-comparison

Hello World examples comparing pymc3, pystan, and edward
Python
8
star
8

odin-quest

Getting Odin working on Quest 2 (android)
Odin
6
star
9

quest_xr

Minimal example building Quest 2 OpenXR application with no build system, IDE, or scripting langs.
C++
4
star
10

openvr_odin

Odin bindings generator for OpenVR
Odin
3
star
11

nes

Natural Evolution Strategies in Go
Go
2
star
12

odin-ufbx

`ufbx` Bindings for Odin
Odin
2
star
13

seer-python

The python client for seer
Python
2
star
14

simpsons_markov

Simpsons plot synopsis generator using markov chains
Python
1
star
15

predictProductSales

Train and execute xgboost model on sales data
R
1
star
16

xr_example

OpenXR example
C
1
star
17

learnvulkan

Vulkan Tutorial in zig
Zig
1
star
18

learngl-odin

learnopengl.com tutorials in odin
Odin
1
star
19

atari-rpc

An RPC server wrapping the OpenAI Gym atari environments
Python
1
star
20

block_allocator

Byte range suballocator in C or Odin, for suballocating GPU heaps.
C
1
star
21

openxr_odin

OpenXR bindings generator for Odin
Odin
1
star
22

de

Adapative Differential Evolution Optimiser (C99, Single Header)
C
1
star
23

flag_sort

American Flag Sort (C99, Single Header)
C
1
star