Glad generates Vulkan, OpenGL, GLES, EGL, GLX, and WGL loaders from official Khronos specifications. Output is available for several languages via a web generator or local tool.
Overview
Glad is a loader generator rooted in the official graphics API specs rather than hand-maintained extension lists. You pick API versions and extensions, then emit source tailored to C/C++, Rust, Fortran, and other targets supported by Glad 2 plugins.
An online webservice for Glad 2 can produce files without a local clone. The 2.0 branch expands functionality and changes APIs compared with the older glad1 generator, and some languages remain glad1-only.
Examples cover GLFW and SDL integrations, multiple windows, GLX, WGL, EGL, and Vulkan with GLFW. Community plugins extend language support beyond the core tree. Generated loader code is public domain, WTFPL, or CC0, with separate licensing notes for Khronos-related inputs.
Typical use is at build time: a graphics application or engine invokes Glad to generate function pointers and extension loading code matched to the exact API profile the project needs.
Key features
- Vulkan and GL family loaders
- Specification-based generation
- Glad 2 web generator
- C/C++ and Rust outputs
- Extension selection UI
- GLFW and SDL examples
- Community language plugins
- EGL, GLX, and WGL support
Use cases
- OpenGL extension loading in C++
- Vulkan entry point generation
- Cross-platform GLES projects
- Choosing exact API versions at build time