gtStateSetOthermode.3p 1.95 KB
.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)