50
Chapter 3: Specifying the Appearance of Geometries
Setting the csTexGen Mode
If you think of the texture plane as being projected onto the surface of a geometry rather
than being on the surface of a geometry, it is easy to understand how the mode settings
in csTexGen work. Either the plane is stationary and the geometry moves “under” it or
the plane moves in concert with the geometry. In the second case, the colors of the plane
appear to be part of the geometry when it moves; in the first case, the colors of the plane
appear to ride over the geometry when it moves.
You set the mode of each plane in csTexGen to one of the following values:
OFF Turns off the texture.
EYE_LINEAR Lets the geometry turn independently of the texture plane. In this case,
the colors of the plane appear to ride over the geometry when it moves.
This value is the default.
OBJECT_LINEAR
Lets the texture move in coordination with the geometry. In this case, the
texture appears to be on the surface of the geometry.
SPHERE_MAP
Lets the texture pattern remain stationary as the geometry moves thus
producing a mirror-like, circular reflection.
EYE_LINEAR_IDENT
Loads the identity matrix onto the modelview stack before loading the
plane equation.
Enabling Texture Generation
The setTexGen() function is enabled or disabled using setTexGenEnable() with an
argument of ON or OFF, respectively. Enabling the generation is, in effect, like turning on
the light which shines through the plane and onto a geometry. Disabling the generation
turns off the light.
The remaining sections apply to the appearance of the geometry itself.