vsvsv / zig-opengl-minimal-template

Zig OpenGL template with minimum dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zig Minimal OpenGL Template

Minimalist cross-platform window with OpenGL context in Zig


  • Depends only on GLFW and glad
  • Tested on Zig version 0.13.0-dev.249+ed75f6256 (see other branches for different Zig versions)
  • Cross-platform compilation for Linux, MacOS and Windows
  • Suitable for following OpenGL tutorials on LearnOpenGL.com

Supported Zig versions

The master branch tries to support the most recent Zig version from master branch.

There are other branches named zig-%vesion% which has support for different older Zig versions.

How To Use

Note If you're building on Linux, ensure you have installed all required packages for GLFW. Please check "Dependencies for Wayland and X11" on Compiling GLFW Guide.

# Clone this repository
git clone https://github.com/vsvsv/zig-opengl-minimal-template

# Go into the repository
cd zig-opengl-minimal-template

# Fetch GLFW as submodule
git submodule update --init

# Build program
zig build run

License

MIT

About

Zig OpenGL template with minimum dependencies


Languages

Language:Zig 100.0%