$ account Dav1dde
Glad is a multi-language code generator that produces loaders for Khronos graphics APIs (OpenGL, Vulkan, EGL, GLX, WGL). It parses official XML specification registries and generates C/C++ and Rust source files that load all required function pointers at runtime, supporting multiple contexts (MX), header-only builds, debug callbacks, on-demand loading, and alias resolution. The architecture is modular: a Python CLI dispatches to language-specific generators via a plugin system, using Jinja2 templates for output. It includes CMake integration, extensive compile/run tests, and examples for GLFW, SDL2/3, Vulkan, and embedded contexts. The codebase demonstrates strong engineering practices—clean separation of parsing, generation, and template rendering, with reusable patterns for configuration, plugin discovery, and XML processing.