Chapter 1. An Introduction to OpenGL


OpenGL is a good 3D graphics API.

When asked "What makes a good 3D graphics API?", most software developers will probably mention the following:

  • It must allow real-time renderingthat is, it must be efficient.

  • It must be widely supported.

  • It must be easy to use.

Efficiency is often in the eye of the beholder. Many applications require frame rates that allow real-time interactivity, whereas significantly lower frame rates suffice for applications such as offline video production and visualizing terabytes of scientific data. If the application isn't the bottleneck, and the API is well designed, API efficiency should always be an implementation issue. A good API design should facilitate and never hinder efficient implementations.

In general, an API whose design facilitates efficiency allows implementation on a wide variety of graphics hardware architectures and computing platforms. Moreover, well-designed APIs remain popular for years and run on several generations of graphics hardware architectures (Lichtenbelt 1997). But for most software developers, the question of API support boils down to "Is it available on my development platform?" or, more important, "Is it available on my customers' platforms?" OpenGL implementations on a wide variety of hardware architectures are well documented (Cojot 1996, Carson 1997, Kilgard 1997, McCormack 1998).

Defining and measuring ease of use is somewhat subjective. Does the API provide a rich feature set? Does it allow flexible usage? Is it self-consistent? After you've learned how to use the API to solve one rendering problem, can you draw upon what you've learned to solve other rendering problems? A majority of "yes" answers indicates that the API is easy to use.

If you assume that efficiency and availability are givens, your primary concern as a new programmer is ease of use. This introductory chapter outlines the overall design of OpenGL and shows you how easy it is to put together a simple test program.

What You'll Learn

Chapter 1 presents the following topics:

  • A high-level description of OpenGLThis section defines OpenGL and covers architecture, syntax, features, and paradigms for querying state.

  • Support librariesThese sections introduce two common support libraries, GLUT and GLU, that most OpenGL programmers will encounter.

  • Development environmentThis section details the header files and libraries you'll need to develop OpenGL applications.

  • ExampleThis section provides a small example program to present the "look and feel" of an OpenGL program.

  • HistoryThis section discusses the origins of OpenGL.

What You Won't Learn

Keep this in mind as you read this chapter:

  • As this chapter enumerates OpenGL features, it also notes features and topics that aren't covered in OpenGL® Distilled.




OpenGL Distilled
OpenGL Distilled
ISBN: 0321336798
EAN: 2147483647
Year: 2007
Pages: 123
Authors: Paul Martz

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