Graphics Reference
In-Depth Information
include normal vectors and texture coor-
dinates, as well as vertex coordinates. It
also includes primitive specifications that
specify how pixels are to be assembled
from your vertices. It may also include
lights when you want the lights to have
specific relationships with your geometry.
You are probably used to including other
definitions, such as colors and material
properties, as you define your geometry.
These are appearance factors for the scene
and are used later in the vertex pipeline,
as we will see. The output of this stage is a
set of vertices in model coordinates, with
other geometric information and with
primitive information.
The second stage of the vertex opera-
tion defines the world space that will hold
the entire scene and puts all your individ-
ual models in that space. Each geometric primitive is placed into world space
by modeling transformations such as scaling, rotation, or translation transfor-
mations, so the input to this stage is your set of modeling transformation spec-
ifications (your glRotatef(...) , glTranslatef(...) , and glScalef(...)
function calls). These transformations convert the individual model space
coordinates into a single set of world or application space coordinates. They
do not affect color or material definitions, texture coordinates, or groupings,
but they do modify vertices, normals, and the geometry of lighting. Often,
lights are defined directly in world space when you think of lighting a whole
scene instead of a single object. Light geometry, such as position or direction,
is affected by whatever modeling is in effect when the light is defined. The
output of this stage is a modified set of vertices and normals, representing the
original geometry in a different space.
The third stage of the vertex operation defines the eye space that is created
when you specify viewing information for your scene. The input to this stage
is your definition of the viewing environment, often using the GLU function
gluLookAt(...) . This defines the viewing transformation that modifies your
scene to create the standard eye view of a scene, a coordinate system with the
eye at the origin, and the x -, y -, and z -axes in their familiar right-handed 3D ori-
entations. This transformation modifies vertex, normal, and light information,
so the output of this stage is the modified geometry with the original primi-
Figure 1.1. Vertex processing in the OpenGL pipeline.
Search WWH ::




Custom Search