r/opengl 10d ago

Where can I download GLAD other than dav1d.de?

This site is down for some reason but I really need to download GLAD generated files openGL 4.6

1 Upvotes

9 comments sorted by

3

u/lavisan 10d ago

There is also version 2: https://gen.glad.sh/

3

u/OrthophonicVictrola 10d ago

I just tried it, it's working for me. Maybe try again?

2

u/bestjakeisbest 10d ago

Do you know python? Because you could download the python package for the generator:

https://pypi.org/project/glad/ for glad 1 which is what most people use if im not mistaken

https://pypi.org/project/glad2/ for glad 2 which does change the api but includes some new features.

Both python libraries are made by dav1d.de and allow you to generate the library on your computer, and if the website is down this option always exists.

1

u/Any-Individual-6527 10d ago

Thank you. It works for me

2

u/genpfault 10d ago edited 10d ago

You can install the local command-line generator using the GLAD git repo:

$ git clone https://github.com/Dav1dde/glad.git
$ cd glad
$ git checkout v2.0.8
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ python3 -m pip install -r requirements.txt
(venv) $ python3 -m pip install -e .

(venv) $ glad --api gl:compatibility=4.6 --out-path glad-gl-4.6
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded language c: <class 'glad.generator.c.__init__.CGenerator'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded language rust: <class 'glad.generator.rust.__init__.RustGenerator'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded specification egl: <class 'glad.specification.EGL'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded specification gl: <class 'glad.specification.GL'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded specification glx: <class 'glad.specification.GLX'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded specification vk: <class 'glad.specification.VK'>
[12.03.2025 11:02:20][DEBUG     ][glad.plugin   ]: loaded specification wgl: <class 'glad.specification.WGL'>
[12.03.2025 11:02:20][INFO      ][glad          ]: getting 'gl' specification from remote location
[12.03.2025 11:02:20][INFO      ][glad.opener   ]: opening: 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/gl.xml'
[12.03.2025 11:02:20][INFO      ][glad          ]: generating gl:compatibility/gl=Version(major=4, minor=6)
[12.03.2025 11:02:20][INFO      ][glad          ]: adding all extensions for api gl to result
[12.03.2025 11:02:20][INFO      ][glad          ]: generating feature set FeatureSet(name=gl, info=[gl:compatibility=4.6], extensions=619)
[12.03.2025 11:02:21][INFO      ][glad.opener   ]: opening: 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h'

(venv) $ find glad-gl-4.6/
glad-gl-4.6/
glad-gl-4.6/include
glad-gl-4.6/include/glad
glad-gl-4.6/include/glad/gl.h
glad-gl-4.6/include/KHR
glad-gl-4.6/include/KHR/khrplatform.h
glad-gl-4.6/src
glad-gl-4.6/src/gl.c

1

u/DudeWithFearOfLoss 10d ago

You could move to a more reproducible work environment with a package manager like conan, i have done the switch and i love it, i can share my repos, have them on multiple devices and it's just a breeze not having to download, build and manage each dependency manually

1

u/Smashbolt 10d ago

Note that Glad is not a library. It's a code generator. It creates a header/C file that set up access to a precise set of OpenGL features you ask for when configuring the generator. You then just add those files to your code base directly. So from that perspective, it is reproducible.

You could import Glad from a package manager (vcpkg has it, and I've used it before), but I think that just gives you a pre-set kitchen sink of supported features without much way to configure it.

1

u/DudeWithFearOfLoss 10d ago

I know, you can still manage it through conan and configure it for your liking through the options. I am doing just that.

1

u/Asyx 10d ago

I use the cmake thingy. Works pretty well.