The repo contains simple demos of using GLFW, Glad and OpenGL.
Tested only with Linux Fedora 41, X11, glfw 3.5.0, glad 2.0.8 and zig 0.14.0
Before running the demos:
- check GLFW 3.5.0 requirements, especially installing dependencies; system environment is not checked for required packages and their absence may generate errors
- update Glad with webservice, existing files may
not meet desired requirements (optional, check first
include/glad/gl.h
) - install Zig 0.14.0 programming language
- install Clang (19.1.7), this version is informative, the code may or may not work with other versions
Demos requires linking to the C libraries from target environment; this is done by default, but the system must provide these libraries.
Repo uses the Zig Build System to build and run the demos written in C language.
GLFW and Glad are built by default when building a demo, and outputs will
be in zig-out/include
and zig-out/lib
folders; see the related files
in pkg/glfw
and pkg/glad
for their implementation.
More information are in build.zig and each demo file.
Use zig build run -- demo/<folder_name>
step to run a demo, output will
be in zig-out/bin
. Step zig build run
uses the src
folder by default.
Unless explicitly stated otherwise, the source codes are licensed under the MIT License