SkillAgentSearch skills...

Glbinding

A C++ binding for the OpenGL API, generated using the gl.xml specification.

Install / Use

/learn @cginternals/Glbinding
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<br><a href="https://glbinding.org"><img src="https://raw.githubusercontent.com/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true" width="50%"></a>

glbinding is a cross-platform C++ binding for the OpenGL API.

GitHub release C++ CI Travis Appveyor Tokei

Documentation Examples Tools

glbinding leverages 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 headers, lazy function resolution, multi-context and multi-thread support, global and local function callbacks, meta information about the generated OpenGL binding and the OpenGL runtime, as well as tools and examples for quick-starting your projects. Based on the OpenGL API specification (gl.xml) glbinding is generated using python scripts and templates that can be easily adapted to fit custom needs.

what-is-glbinding

Code that is written using a typical C binding for OpenGL, e.g., GLEW, is fully compatible for the use with glbinding and causes no significant impact on runtime performance (see compare example): just replace all includes to the former binding, replace the initialization code and use the appropriate API namespace, e.g., gl for full availability of the OpenGL API.

#include <glbinding/gl/gl.h>
using namespace gl;

// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...

glbinding is compatible with OpenGL-compatible windowing toolkits and we provide example integrations for the following ones within the examples:

Resources

Installation and Development

Feature Documentation and Code Snippets

Install Instructions

glbinding is available for different platforms using different distribution channels. You can either download the source and manually compile it or use one of the pre-compiled releases of this repository. For systems providing package managers, we generally strive for packages in these package managers. An overview on availability of glbinding can be found on repology.org.

Windows

The various glbinding packages can be installed either by downloading an installer, e.g., the x64 installer for glbinding v3.1.0 for Microsoft Visual Studio 2015, or downloading and extracting one of the precompiled archives, e.g. runtime, examples, dev, and tools. Since lately, glbinding is also available on vcpkg with more recent releases:

> vcpkg install glbinding

Alternatively, download the source code and commence building from source.

Ubuntu

glbinding is provided on Ubuntu using PPAs and in Ubuntu universe since Artful Aardvark. We maintain our own PPA for most recent releases. Using the current PPA as example, the following lines install glbinding including the GLFW examples:

> sudo apt-add-repository ppa:cginternals/ppa
> sudo apt-get update
> sudo apt-get install libglbinding-examples-glfw
> # start example
> /usr/share/glbinding/cubescape

To use glbinding as dependency, install the development package:

> sudo apt-get install libglbinding-dev libglbinding-dbg

Alternatively, download the source code and commence building from source.

Arch Linux

On Arch, glbinding is provided by the glbinding package in the community repository. To install glbinding execute the following line:

> sudo pacman -S glbinding

Alternatively, download the source code and commence building from source.

macOS

The package manager on macOS we depend on is homebrew. The package there is called glbinding. To install glbinding using homebrew, execute the following line:

> brew install glbinding

Alternatively, download the source code and commence building from source.

Debian-based Systems

glbinding is available for Debian 9 (Stretch), 10 (Buster), 11 (Bullseye) and Sid. Install it using apt install libglbinding-dev. For advanced use, download the source code and commence building from source.

Cross-Platform Package Managers

As one of the cross-platform package managers, conan provides glbinding in its center index. You can use the following line to install glbinding using conan:

> conan install glbinding/3.1.0@

Build Instructions

Prerequisites and Dependencies

The only mandatory run-time dependencies of glbinding are the STL of the used compiler and an OpenGL driver library, dynamically

Related Skills

View on GitHub
GitHub Stars871
CategoryProduct
Updated7d ago
Forks95

Languages

C++

Security Score

100/100

Audited on Mar 24, 2026

No findings