OpenGL Distilled

OpenGL has outlived several generations of computer graphics hardware. This accomplishment would have been unattainable if not for the extension and version system that allowed OpenGL to evolve.

As OpenGL vendors provide new graphics hardware with additional functionality, they create extension specifications that allow developers to access the new functionality using OpenGL. Over time, if these extensions grow in popularity and acceptance, the OpenGL ARB could include the feature in a new version of the OpenGL specification.

You can't count on all your customers to have the same OpenGL version and extension support. As a result, you need to write version- and extension-safe code so that it can run in a wide variety of OpenGL environments. This chapter covers what you need to know to write robust code that uses extension- and version-specific OpenGL features.

What You'll Learn

This chapter covers the essentials of using OpenGL extensions and versions. Topics covered include the following:

  • Querying for extension and version supportHow to write code that queries the OpenGL implementation at runtime for supported functionality.

  • Entry-point addressesHow to obtain addresses for extension- and version-specific command entry points at runtime.

  • Development environment issuesHow to write code that compiles in a variety of development environments.

What You Won't Learn

Aspects of extensions and versions not covered in this chapter include

  • A complete list of available extensionsSee the OpenGL Extension Registry Web site for this information: http://oss.sgi.com/projects/ogl-sample/registry/

  • A complete list of features included in each versionSee The OpenGL Graphics System for such a list.

Категории