OpenGL Extension

From OpenGL Wiki
Revision as of 06:51, 25 February 2007 by V-man (talk | contribs)
Jump to navigation Jump to search

Introduction to the extension mechanism

Each release of OpenGL represents a core of graphics functionality and API calls which must be supported by any vendor claiming to support OpenGL. However this core of API functionality does not prevent individual implementors or groups of implementors from adding new features and API calls. In fact even at the time of a core release some official optional graphics capabilities may also be specified. All these categories enhanced functionality and the associated API calls and tokens are referred to as extensions. Each OpenGL extension is carefully specified in the context of the broader OpenGL specification and there are runtime checks that can be used to query the existence of any extension and generate the appropriate function call.

Vertex submission extensions

Texturing related extensions

Programmability extensions

Framebuffer related extensions

Extension Registery

The OpenGL Extension Registery is maintained by SGI and contains the technical specifications of all known OpenGL extensions. The registry also contains guidelines for creating new extensions and has example C/C++ header files containing function entry points and token enums. The extension registry can be intimidating with over 350 extensions plotting OpenGL's development over 10+ years. However, most of the extensions have either been folded into OpenGL core or have been rendered obsolete by newer core functionality.

OpenGL Extension Registry

What Are The Extension Types

Some extensions start with GL_EXT, others with GL_NV, GL_ATI, GL_ARB, GL_MTX, GL_APPLE, GL_SGI.
EXT means it is multivendor. It is developed by multiple vendors and other companies can include it in there drivers as well.

NV is nVidia specific but other companies can license it. The same applies to other company extensions
NVX is nVidia and is considered experimental so don't use it in a commercial program as it may be removed in the future.
ATI is from ATI, obviously.
3DLABS, also obvious.
SGIX, experimental
SGIS, it is from SGI but I don't know what the S is for
3DFX, closed its doors in 2000
MTX, matrox

and finally, ARB. Extensions which prove their worth become ARB approved (GL_ARB_multitexture) and shortly after become core.
Most likely, an extension is already of type EXT, then becomes ARB, then core.
In some cases, but not many, a vendor specific extension becomes ARB, then core. Often, the original inventor just allows other companies to also code it into their drivers with no royalty requirements.

If an extension becomes core, do the vendors remove it from the extension string?

The answer is NO because old software depend on [email protected]@@@@@@@@
I put those @@@@@@@@@ so that people will notice it.
In very rare occasions an extension is removed because driver writers don't want to waste time. Perhaps 2 or 3 have been eliminated from the extension database.

Also, there are OS specific extensions :
AGL for the Mac OSX. Visit

In some rare occasions, there is a difference between extension and the core function, for example the case of GLSL in GL 2.0 and the older extensions, and the case for environment textures.
Most of the 300 extensions in the extensions registry
OpenGL Extension Registry
are too old. You only need perhaps 5 or so of them.
For the rest, just use GL 2.0 (2.1 is the current version but there is no significant change)

The lastest and greatest extensions are :
and others

Can anybody develop an extension?
Yes, it is not just large companies that develop OpenGL. The community gives feedback.
In the case of GL_GREMEDY_string_marker, the feature was desired for the GLIntercepter and someone said why not have a extension, then someone wrote an initial spec. Now it's in the official registry.