gSPGeometryMode.3p
2.12 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.TH gSPGeometryMode 3P local "SGI"
.SH NAME
.upperok
gSPSetGeometryMode, gsSPSetGeometryMode,
gSPClearGeometryMode, gsSPClearGeometryMode
\- set and clear geometry pipeline modes.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
gSPSetGeometryMode(Gfx *gdl, unsigned int mode)
gsSPSetGeometryMode(unsigned int mode)
gSPClearGeometryMode(Gfx *gdl, unsigned int mode)
gsSPClearGeometryMode(unsigned int mode)
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I mode
geometry pipeline modes.
Modes are bit ORed together and set or cleared depending on command.
.sp
\f3G_SHADE\f1
RSP will calculate the color at vertices of triangle.
Do not enable this when using the primitive color to specify the color
for a triangle.
\f3G_LIGHTING\f1
enable lighting calculations.
\f3G_SHADING_SMOOTH\f1
enable Gouraud shading.
If this is not enabled, the color for a triangle will be flat shaded.
The color of the triangle will be determined by the color of one of its
vertices.
See gSP1Triangle(3P).
Must also set G_SHADE.
\f3G_ZBUFFER\f1
enable z-buffer calculations. (note you may also need to set
other z-buffer parameters for the framebuffer)
\f3G_TEXTURE_GEN\f1
enable the automatic generation of the texture coordinates \f2s\f1 and \f2t\f1.
A spherical mapping is used, based on the normal.
\f3G_TEXTURE_GEN_LINEAR\f1
enable the automatic generation of the texture coordinates \f2s\f1 and \f2t\f1.
\f3G_CULL_FRONT\f1
enable culling the front-facing polygons.
\f3G_CULL_BACK\f1
enable culling the back-facing polygons.
\f3G_CULL_BOTH\f1
enable culling both the front and back-facing polygons.
\f3G_FOG\f1
enable generation of fog parameters for vertex alpha coordinate.
.SH DESCRIPTION
The gSPSetGeometryMode command is used to turn on geometry
pipeline modes.
gSPClearGeometryMode clears these modes.
.SH NOTE
There are other elements of the RSP 'rendering state' which have
their own commands. In those cases, either the state change
is more complex than a single bit, or there is an optimization
for the RSP geometry engine which requires a different command.
.SH SEE ALSO
.IR gSPFogPosition (3P), gDPSetPrimColor (3P), gSP1Triangle(3P)