Skip to content

Simple demos of using GLFW, Glad and OpenGL.

License

Notifications You must be signed in to change notification settings

7R35C0/opengl-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

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

📌 Requirement

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.

📌 Implementation

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.

📌 Usage

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.

📌 License

Unless explicitly stated otherwise, the source codes are licensed under the MIT License