Overview of glbinding
masterglbinding is a cross-platform C++ binding for the OpenGL API. Unlike traditional C bindings (like GLEW) that rely heavily on macros, glbinding leverages C++11 features such as enum classes, lambdas, and variadic templates.
Key features include:
- All OpenGL symbols are real functions and variables (no macros).
- Type-safe parameters.
- Per-feature API headers.
- Lazy function resolution.
- Multi-context and multi-thread support.
- Global and local function callbacks.
- Meta information about the generated binding and the OpenGL runtime.
It is designed to be highly compatible with existing OpenGL code. To migrate from a C binding, you can typically replace the includes, replace the initialization code, and use the appropriate API namespace (e.g., gl for full availability).
#include <glbinding/gl/gl.h>
using namespace gl;
// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...