glbinding: new C++ OpenGL Binding with OpenGL 4.5 Support

glbinding: new C++ OpenGL Binding

glbinding is new library intended for making the graphics developer’s life easier. glbinding, developed by the Computer Graphics Systems Group at the Hasso Plattner Institute (in Germany), is a generated, cross-platform C++ binding for OpenGL which is solely based on the new xml-based OpenGL API specification (gl.xml).

The authors of glbinding have also developed glRAW and glIsDeprecated.

glbinding 1.0.0, the first public version, comes with the support of OpenGL 4.5.

glbinding is a generated, cross-platform C++ binding for OpenGL which is solely based on the new xml-based OpenGL API specification (gl.xml). It is a fully fledged OpenGL API binding compatible with current code based on other C bindings, e.g., GLEW. The binding is generated using python scripts and templates, that can be easily adapted to fit custom needs. glbinding can be used as an alternative to GLEW and other projects, e.g., glad, gl3w, glLoadGen, glload, and flextGL.

glbinding leverages modern C++11 features like enum classes, lambdas, and variadic templates, instead of relying on macros (all OpenGL symbols are real functions and variables). It provides type-safe parameters, per feature API header, lazy function resolution, multi-context and multi-thread support, global function callbacks, meta information about the generated OpenGL binding and the OpenGL runtime, as well as multiple examples for quick-starting your projects.

Here is a code snippet based on glbinding:

#include <glbinding/gl/gl.h>
#include <glbinding/Binding.h>

using namespace gl;

int main()
  // create context, e.g. using GLFW, Qt, SDL, GLUT, ...


  // ...

More information, source code and examples are available HERE.

3 thoughts on “glbinding: new C++ OpenGL Binding with OpenGL 4.5 Support”

  1. jj99

    Wow ~20MB headers. Most of it copying from one namespace to another. Thanks, but no thanks…

  2. cgcostume

    @jj99: yes, seems quite a lot. However, for an actual project, usually only one or two opengl version(s) are used simultaneously and only the associated feature-headers are required (about 1MB of headers). With that, for whatever version is selected, only the minimal subset of required headers needs to be compiled, thus saving compile time and further, yielding smaller binaries.

    E.g., if one likes to use opengl 4.5-core and extensions, only headers gl45_core and gl45_ext are required (resulting in ~1MB including all dependencies).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>