文档介绍:OpenGL Programming Guide (Addison-Wesley
pany)
Chapter 1
Introduction to OpenGL
Chapter Objectives
After reading this chapter, you’ll be able to do the following:
Appreciate in general terms what OpenGL does
Identify different levels of plexity
Understand the basic structure of an OpenGL program
Recognize mand syntax
Identify the sequence of operations of the OpenGL rendering pipeline
Understand in general terms how to animate graphics in an OpenGL program
This chapter introduces OpenGL. It has the following major sections:
"What Is OpenGL?" explains what OpenGL is, what it does and doesn’t do, and how it works.
"A Smidgen of OpenGL Code" presents a small OpenGL program and briefly discusses it. This
section also defines a few puter-graphics terms.
"mand Syntax" explains some of the conventions and notations used by OpenGL
commands.
"OpenGL as a State Machine" describes the use of state variables in OpenGL and mands
for querying, enabling, and disabling states.
"OpenGL Rendering Pipeline" shows a typical sequence of operations for processing geometric
and image data.
"OpenGL-Related Libraries" describes sets of OpenGL-related routines, including an auxiliary
library specifically written for this book to simplify programming examples.
"Animation" explains in general terms how to create pictures on the screen that move.
What Is OpenGL?
OpenGL is a software interface to graphics hardware. This interface consists of about 150 distinct
commands that you use to specify the objects and operations needed to produce interactive
three-dimensional applications.
OpenGL is designed as a streamlined, hardware-independent interface to be implemented on many
different hardware platforms. To achieve these qualities, mands for performing windowing tasks
or obtaining user input are included in OpenGL; instead, you must work through whatever windowing
system controls the particular hardware you’re using. Similarly, OpenGL doe