OpenGL Loading Library

From OpenGL Wiki
Revision as of 09:02, 9 April 2011 by Alfonse (talk | contribs) (Destub-ifying)
Jump to navigation Jump to search

An Extension Loading Library is a library that users can use to simplify the loading of extension functions. These libraries tend to be based on code-generation, so they keep the user from having to write a lot of boilerplate code.

Most extension loading libraries override the need to include gl.h at all. Instead, they provide their own header that must be used. Most extension loading libraries use code generation to construct the code that loads the function pointers and the included headers.

GLEW

The OpenGL Extension Wrangler library provides access to all GL entrypoints. It supports Windows, MacOS X, Linux, and FreeBSD.

GLee

Currently seems defunct.

GL3W

The GL3W library focuses on the core profile of OpenGL 3 and 4. It only loads the core entrypoints for these OpenGL versions (and the extensions, of course). It supports Windows, Linux, and FreeBSD.

GL3W relies on Python 2.6 for its code generation. Unlike other extension loaders, GL3W actually does the code generation on your machine. This is based on downloading and parsing the gl3.h file from the OpenGL Registry website.

On the one hand, this means that it is always up-to-date, more or less. On the other hand, this also makes it beholden to the format of gl3.h (which has no true format), as well as requiring that the user of GL3W have a Python 2.6 installation.