gSPNumLights.3p 1.24 KB
.TH gSPNumLights 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gSPNumLights, gsSPNumLights
\- specify number of light structures to load into the RSP.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"

gSPNumLights(Gfx *gdl, int n)

gsSPNumLights(int n)
.fi
\fP
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I n
Number of diffuse lights to light with.  Should be one of NUMLIGHTS_0, NUMLIGHTS_1, NUMLIGHTS_2, ..., NUMLIGHTS_7.
.TP

.SH DESCRIPTION
This command tells the RSP how many lights are to be used in lighting calculations.
Use it
in conjunction with the
.I gSPLight (3P)
command which actually loads the lights to be used.  Note that
any time the lighting state is altered with 
.I gSPLight (3P)
the 
.I gSPNumLights (3P)
command must be used to tell the RSP that the lights have been changed (even if the
NUMBER of lights has not changed).
.PP
When only ambient lights are used, use NUMLIGHTS_0, set light #1 to be black, and
light #2 to be the ambient color.
.PP
The best way to define static lights is to use the 
.I gdSPDefLights (3P)
command followed by the 
.I gSPSetLights (3P)
command (instead of using gSPLight(3P) and gSPNumLights(3P) explicitly).
.SH SEE ALSO
.IR gdSPDefLights (3P),
.IR gSPLight (3P),
.IR gSPSetLights (3P)