7R35C0/opengl-demo
Simple demos of using GLFW, Glad and OpenGL.
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:
include/glad/gl.h
)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