OpenGL Extensions

You can achieve pretty spectacular results using standard OpenGL calls. You can also be sure that as soon as newer hardware features become mainstream, you will be able to use them in your OpenGL programs. However, graphics hardware evolves at a rapid pace, sometimes outpacing OpenGL. Features must be implemented in a variety of cards before they are fully integrated into the standard, so frequently it takes sometime for the newer features to become available in the API.

Thus, sometimes you will purchase a new graphics card and some of its cutting-edge features will not be available in OpenGL. You could wait until the next OpenGL release, but that is simply not practical: It can take months or even years because some features are only supported by one vendor, and thus never make it to the standard.

Luckily, there is a better option. Because OpenGL is a standard, all adapters must conform to it and support all features. However, there is a caveat for those cases in which a certain feature must be exposed, but only for specific adapters. It is called the extension mechanism, and it allows developers to access cutting-edge features found in newer chips just weeks after the chip debuts.

An OpenGL extension is a set of calls that implement vendor-specific functionality, and thus is not considered part of the standard. Any graphics adapter can choose to implement that extension or not, and the applications programmer must check whether the extension is available prior to executing it. As an example, some graphics cards support stereo viewing, so you can plug special glasses into your computer and visualize 3D graphics realistically. Clearly, this feature is vendor specific, and other cards might not be interested in it at all. But programmers need to be able to access this functionality from their OpenGL programs. So the adapter's manufacturer creates an OpenGL extension, and thus programmers can access this feature.



Core Techniques and Algorithms in Game Programming2003
Core Techniques and Algorithms in Game Programming2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net