OpenGL Extension

From OpenGL.org
Revision as of 11:24, 20 July 2009 by V-man (Talk | contribs) (Specific Extension Usage)

Jump to: navigation, search

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.

Extension Registry

The OpenGL Extension Registry 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 the development of the OpenGL API for more than a decade. However, most of the extensions have either been folded into the OpenGL core API or have been rendered obsolete by newer core functionality.

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 multi-vendor. It is developed by multiple vendors and other companies can include it in there drivers as well. Below follows a table with frequently found extension prefixes.

Regardless of the vendor prefix, vendor-specific OpenGL extensions may be implemented an/or licensed by multiple hardware vendors to ensure compatibility.

Extension Prefix Extension Vendor
ARB OpenGL® ARB approved extensions.
NV NVIDIA Corporation.
NVX NVIDIA Corporation. Experimental extension.1
ATI ATI Technologies, Inc.
3DLABS 3DLABS, Inc.
SUN Sun Microsystems, Inc.
SGI Silicon Graphics, Inc.
SGIX Silicon Graphics, Inc. Experimental extension.1
SGIS Silicon Graphics, Inc. Experimental extension.1
INTEL Intel Corporation.
3DFX 3dfx Interactive.
IBM International Business Machines Corporation, or simply IBM.
MESA The Mesa 3D Graphics Library.
GREMEDY Graphic Remedy, Ltd.
OML Khronos Group, Inc. API: OpenML®
OES Khronos Group, Inc. API: OpenGL® ES
PGI Portland Group Inc.
I3D Intense3D, now 3DLABS Inc.
INGR Intergraph Corporation.
MTX Matrox Electronic Systems Ltd.
Extension Prefix Extension Platform
WGL_EXT, WGL_ARB, WGL_ATI, WGL_NV Microsoft Corporation. WGL = Windows OpenGL
GLX_EXT, GLX_ARB, GLX_ATI, GLX_NV Linux platforms.
AGL Apple Inc. AGL = Apple OpenGL

1, Experimental extensions should not be used in a production environment as they are subject to removal from implementation.

ARB Approval

Proprietary extensions which prove their worth can become ARB approved (such as 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 proprietary extension becomes ARB, then core. Often, the original extension's developer allows other companies to also code it into their drivers without royalty requirements.

When a proprietary extension becomes an ARB approved core extension, the vendor will rarely – if ever – remove it from their extension implementation. This is done to ensure backwards compatibility with software which implements older extensions.

In some rare occasions, there is a difference between extension and the core function, for example the case of GLSL in OpenGL 2.0 and the older extensions, and the case for environment textures. Many of the extensions in the OpenGL Extension Registry (OpenGL Extension Registry) are deprecated, make sure deprecated extensions are not used.

Extension Development

Anyone may develop extensions for the OpenGL® API; the community gives feedback. An example case would be the GL_GREMEDY_string_marker extension, which was initially a private extension, is now included in the OpenGL Extension Registry.

Specific Extension Usage

Vertex submission extensions

Texturing related extensions

Programmability extensions

Framebuffer related extensions

External Links

Extensions of Interest for the GL 2 Programmer

Extensions that you might need if you are targeting systems with GL 2.0 or GL 2.1
Perhaps you are new to GL programming and you find the large list at http://www.opengl.org/registry much too long to sift through.

GL_ARB_texture_rectangle
GL_ARB_color_buffer_float
GL_ARB_half_float_pixel
GL_ARB_texture_float
WGL_EXT_extensions_string (and the WGL extensions you can get with this extension)
GL_EXT_texture_filter_anisotropic
GL_NV_fence
GL_EXT_packed_depth_stencil
GL_NV_texture_compression_vtc
GL_EXT_texture_compression_s3tc
GL_NV_vertex_program (Many versions. GL_NV_vertex_program2, GL_NV_vertex_program3)
GL_NV_fragment_program (Many versions. GL_NV_fragment_program2, GL_NV_fragment_program3)
GL_GREMEDY_string_marker, GL_GREMEDY_frame_terminator (Special. Available in GLintercept which is a debugging tool)
GL_EXT_framebuffer_object
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample
GL_NV_framebuffer_multisample_coverage
GL_EXT_timer_query
GL_EXT_gpu_program_parameters
GL_NV_gpu_program4
GL_EXT_geometry_shader4
GL_EXT_gpu_shader4
GL_EXT_draw_instanced
GL_EXT_packed_float
GL_EXT_texture_array
GL_EXT_texture_buffer_object
GL_EXT_texture_compression_latc
GL_EXT_texture_compression_rgtc
GL_EXT_texture_shared_exponent
GL_NV_depth_buffer_float
GL_EXT_framebuffer_sRGB
WGL_EXT_framebuffer_sRGB
GL_NV_parameter_buffer_object
GL_EXT_draw_buffers2
GL_EXT_bindable_uniform
GL_EXT_texture_integer
GL_NV_conditional_render
GL_EXT_transform_feedback