1. The Fixed-Function Graphics Pipeline
The Traditional View
When you develop a graphics application with the OpenGL API, you dene
geometry, viewing, projection, and a number of appearance properties.
Objects’ geometries are dened by their vertices, their normals, and their
graphics primitives, specied by
glBegin-glEnd pairs that encompass points,
lines, geometry-compressed groups, or polygons. Viewing and projection are
each dened with a specic function. Appearance is specied by dening
color, shading, materials, and lighting, or texture mapping. This information
is all processed in a very straightforward way by the xed-function OpenGL
system, acting either in software or in a graphics card.
The simplest way to view OpenGL’s operations is to think of it as using
two connected operations: a vertex-processing operation and a pixel-processing
operation. Each operation in xed-function OpenGL has a pre-determined set
of capabilities. It is important to understand how the geometry and appear-
ance directives you give are carried out in the pipelines. When you work with
shaders, though, it is more than important to understand the pipelines; your
shaders will actually take over part of these operations, so you absolutely must
The Vertex Operation
To create the geometry of a scene, you specify primitives and vertices, and
operations that act on each vertex and create its pixel coordinates in screen
space. The primitive you specied then determines the pixels that must be
lled to represent it, and any appearance information you specied is used to
determine how those pixels are to be colored in the pixel-processing operation.
The geometry part of the vertex processing follows the ow in Figure 1.1. The
geometry processing is carried out for each vertex independently of any infor-
mation on grouping in your specied primitive; the grouping information is
only used after the vertices nish the vertex processing.
The rst stage of the vertex operation denes the fundamental geom-
etry of your scene. The input to this stage is the set of vertex denitions (your
glVertex*, glNormal*, and glTexCoord* function calls) and the grouping de-
glBegin(...) and glEnd( ) function calls) that you set for the
scene. Each piece of geometry is created, or modeled, in its own model space.
This coordinate space can be anything that makes it easy for you to dene
the vertices and relationships for your model. Modeling functions include any
operations you may need to create these denitions and often use mathemati-
cal functions operating in the model space. As we noted, the geometry might