Difference between revisions of "OpenGL Extension"

From OpenGL.org
Jump to: navigation, search
m
(What Are The Extension Types: Fixed section formatting, spelling, grammar, etc.)
Line 34: Line 34:
 
[http://www.opengl.org/registry/ OpenGL Extension Registry]
 
[http://www.opengl.org/registry/ OpenGL Extension Registry]
  
=== What Are The Extension Types ===
+
=== Extension Types ===
Some extensions start with GL_EXT, others with GL_NV, GL_ATI, GL_ARB, GL_MTX, GL_APPLE, GL_SGI.<br>
+
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. Below follows a table with frequently found extension prefixes.
EXT means it is multivendor. It is developed by multiple vendors and other companies can include it in there drivers as well.<br>
+
 
<br>
+
{| border="1" cellpadding="5"
NV is nVidia specific but other companies can license it. The same applies to other company extensions<br>
+
|-
NVX is nVidia and is considered experimental so don't use it in a commercial program as it may be removed in the future.<br>
+
! Extension Prefix
ATI is from ATI, obviously.<br>
+
! Extension Vendor
3DLABS, also obvious.<br>
+
|-
SUN<br>
+
| ARB
SGI<br>
+
| OpenGL&reg; ARB approved extensions.
SGIX, experimental<br>
+
|-
SGIS, it is from SGI but I don't know what the S is for<br>
+
| NV
INTEL<br>
+
| NVIDIA Corporation.
3DFX, closed its doors in 2000<br>
+
|-
IBM<br>
+
| NVX
MESA<br>
+
| NVIDIA Corporation. Experimental extension.<sup>1</sup>
GREMEDY<br>
+
|-
OML<br>
+
| ATI
OES<br>
+
| ATI Technologies, Inc.
PGI<br>
+
|-
I3D<br>
+
| 3DLABS
INGR<br>
+
| 3DLABS, Inc.
MTX, matrox<br>
+
|-
<br>
+
| SUN
and finally, ARB. Extensions which prove their worth become ARB approved (GL_ARB_multitexture) and shortly after become core.<br>
+
| Sun Microsystems, Inc.
Most likely, an extension is already of type EXT, then becomes ARB, then core.<br>
+
|-
In some cases, but not many, a vendor specific extension becomes ARB, then core. Often, the original inventor just allows
+
| SGI
other companies to also code it into their drivers with no royalty requirements.<br>
+
| Silicon Graphics, Inc.
<br>
+
|-
If an extension becomes core, do the vendors remove it from the extension string?<br>
+
| SGIX
glGetString(GL_EXTENSIONS);<br>
+
| Silicon Graphics, Inc. Experimental extension.<sup>1</sup>
<br>
+
|-
The answer is NO because old software depend on it@@@@@@@@@<br>
+
| SGIS
I put those @@@@@@@@@ so that people will notice it.<br>
+
| Silicon Graphics, Inc. Experimental extension.<sup>1</sup>
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.<br>
+
|-
<br>
+
| INTEL
Also, there are OS specific extensions : <br>
+
| Intel Corporation.
WGL_EXT, WGL_ARB, WGL_ATI, WGL_NV  (for Windows)<br>
+
|-
GLX_EXT, GLX_ARB, GLX_ATI, GLX_NV (for *nix)<br>
+
| 3DFX
AGL for the Mac OSX. Visit http://www.apple.com/macosx/features/opengl/<br>
+
| 3dfx Interactive.
<br>
+
|-
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.<br>
+
| IBM
Most of the 300 extensions in the extensions registry<br>
+
| International Business Machines Corporation, or simply IBM.
[http://www.opengl.org/registry/ OpenGL Extension Registry]<br>
+
|-
are too old. You only need perhaps 5 or so of them.<br>
+
| MESA
For the rest, just use GL 2.0 (2.1 is the current version but there is no significant change)<br>
+
| The Mesa 3D Graphics Library.
<br>
+
|-
The lastest and greatest extensions are :<br>
+
| GREMEDY
GL_EXT_framebuffer_blit<br>
+
| Graphic Remedy, Ltd.
GL_EXT_framebuffer_multisample<br>
+
|-
GL_EXT_framebuffer_object<br>
+
| OML
GL_EXT_gpu_program_parameters<br>
+
| Khronos Group, Inc. API: [http://www.khronos.org/openml/ OpenML&reg;]
GL_EXT_render_target2<br>
+
|-
GL_EXT_render_target<br>
+
| OES
GL_EXT_timer_query<br>
+
| Khronos Group, Inc. API: [http://www.khronos.org/opengles/ OpenGL&reg; ES]
GL_EXT_geometry_shader4<br>
+
|-
and others<br>
+
| PGI
<br>
+
| Portland Group Inc.
<br>
+
|-
Can anybody develop an extension?<br>
+
| I3D
Yes, it is not just large companies that develop OpenGL. The community gives feedback.<br>
+
| Intense3D, now 3DLABS Inc.
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.<br>
+
| INGR
 +
| Intergraph Corporation.
 +
|-
 +
| MTX
 +
| Matrox Electronic Systems Ltd.
 +
|-
 +
! Extension Prefix
 +
! Extension Platform
 +
|-
 +
| WGL_EXT, WGL_ARB, WGL_ATI, WGL_NV
 +
| Microsoft Corporation. WGL = '''W'''indows Open'''GL'''
 +
|-
 +
| GLX_EXT, GLX_ARB, GLX_ATI, GLX_NV
 +
| Linux platforms.
 +
|-
 +
| AGL
 +
| Apple Inc. AGL = '''A'''pple Open'''GL'''
 +
|-
 +
|}
 +
<sup>1</sup>, 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 &ndash; if ever &ndash; 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 ([http://www.opengl.org/registry/ OpenGL Extension Registry]) are deprecated, make sure deprecated extensions are not used.
 +
 
 +
==== Extension Development ====
 +
Anyone may develop extensions for the OpenGL&reg; 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.

Revision as of 16:16, 2 April 2008

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

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. Below follows a table with frequently found extension prefixes.

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.