next up previous contents index
Next: Lighting Operation Up: 2.13 Colors and Coloring Previous: 2.13 Colors and Coloring

2.13.1 Lighting

 

GL lighting computes a color for each vertex sent to the GL. This is accomplished by applying an equation defined by a client-specified lighting model to a collection of parameters that can include the vertex coordinates, the coordinates of one or more light sources, the current normal, and parameters defining the characteristics of the light sources and a current material. The following discussion assumes that the GL is in RGBA mode. (Color index lighting is described in section 2.13.5.)

Lighting may be in one of two states:

  1. Lighting Off. In this state the color assigned to a vertex is the current color.
  2. Lighting On. In this state, a vertex's color is found by computing a value given the current lighting parameters.
Lighting is turned either on or off using the generic Enable  or Disable  commands with the symbolic value LIGHTING.





David Blythe
Sat Mar 29 02:23:21 PST 1997