gSPSetLights.3p
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.TH gSPSetLights 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gSPSetLights, gsSPSetLights
\- load light structures into the RSP.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
typedef struct {
Ambient a;
Light l[M];
} LightsM;
gSPSetLightsM(Gfx *gdl, LightsM lites)
gsSPSetLightsM(LightsM lites)
.fi
\fP
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I lites
LightsM structure to load into the RSP.
.TP
.SH DESCRIPTION
The
.I gSPSetLightsM
command loads light structures for ambient and diffuse lights into the light
buffer. The last character in the command, indicated by M above, represents
the number of diffuse lights in the scene. In the command and in the structure
LightsM, M must be an actual integer in the range of 0 to 7. For example,
with 3 diffuse lights, the command is
.I gSPSetLights3
and the corresponding structure is Lights3.
.PP
Once the lights are activated, they remain on until the next call to
.I gSPSetLightsM.
Whenever a new structure of lights is activated, the old structure of
lights is overwritten.
.PP
In the LightsM structure
Ambient a is the ambient light structure, and Light l[M] is an array
of M diffuse light structures. The LightsM structure can be set up by utilizing the
.I gdSPDefLights
command with the parameters defining the lights as inputs. The individual light
structures combine the color of the light with the color of the material.
.PP
Note: To change the color of some or all of the lights after the light has
been used once or more the use of the
.I gSPLight (3P)
command is more efficient than the
.I gSPSetLightsM
command. See
.I gSPLight (3P).
.SH SEE ALSO
.IR gdSPDefLights (3P)
.IR gSPLight (3P)
.IR gSPLightColor (3P)