gtStateSetOthermode.3p
1.95 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
82
83
84
.TH gtStateSetOthermode 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gtStateSetOthermode \- compose an RDP 'othermode' command.
.SH C SPECIFICATION
.nf
\f3#include "gt.h"
void gtStateSetOthermode(Gfx *om, gtStateOthermode_t mode, int data)
\fP
.fi
.SH PARAMETERS
.TP 10
.I om
pointer to the othermode word. Usually a field from
.I gtGlobState
or
.I gtState
structures.
.TP
.I mode
which othermode to modify. One of:
.nf
.ta 5 28
.sp
GT_CLEAR clear all fields
GT_ALPHACOMPARE conditional color write on
alpha compare
GT_ZSRCSEL choose primitive Z or pixel Z
GT_RENDERMODE set the rendermode
GT_ALPHADITHER select alpha dither type
GT_RGBDITHER select color dither type
GT_COMBKEY enable combine keying
GT_TEXTCONV do texture conversion
GT_TEXTFILT set texture filter
GT_TEXTLUT set texture look up table
GT_TEXTLOD enable texture level of detail
GT_TEXTDETAIL enable texture detail
GT_TEXTPERSP enable texture perspective
GT_CYCLETYPE choose cycle type
GT_PIPELINE set pipeline mode
.fi
.sp
Note: some of these modes are incompatible with the turbo microcode
features.
.TP
.I data
new data to set the appropriate othermode bits. These macros
are the same data macros defined in gbi.h.
.SH DESCRIPTION
This library function is used to assemble RDP 'othermode' commands
for turbo microcode applications.
.PP
The
.I gspFast3D (3P)
microcode presents a more user-friendly "set-and-clear" interface
which hides the details of the RDP othermode command from the user.
This interface is not available with the
.I gspTurbo3D (3P)
microcode, so this function is necessary to construct that RDP
command.
.SH EXAMPLE
The render mode would normally be set with a macro from gbi.h
like this:
.nf
.ta 5 28
.sp
gDPSetRenderMode(gptr++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
.fi
.sp
To construct a similar command for the turbo object state, use:
.nf
.ta 5 28
.sp
gtStateSetOthermode(&(state.sp.rdpOthermode),
(G_RM_OPA_SURF | G_RM_OPA_SURF2));
.sp
.fi
.SH SEE ALSO
.IR gspTurbo3D (3P)