gtStateSetOthermode

gtStateSetOthermode

Function

gtStateSetOthermode

Composes RDP"othermode" command.

Syntax

#include "gt.h"
void gtStateSetOthermode(Gfx *om, gtStateOthermode_t mode, int data)

Arguments

om
Pointer to the othermode word. Usually a field from gtGlobState or gtState structures.
mode
Specifies which of the following othermodes to modify.
GT_CLEAR
to clear all fields

GT_ALPHACOMPARE
for conditional color write on alpha compare

GT_ZSRCSEL
to choose primitive Z or pixel Z

GT_RENDERMODE
to set the render mode

GT_ALPHADITHER
to select the alpha dither type

GT_RGBDITHER
to select the color dither type

GT_COMBKEY
to enable combine keying

GT_TEXTCONV
to do texture conversion

GT_TEXTFILT
to set the texture filter

GT_TEXTLUT
to set the texture look-up table

GT_TEXTLOD
to enable texture level of detail

GT_TEXTDETAIL
to enable texture detail

GT_TEXTPERSP
to enable texture perspective

GT_CYCLETYPE
to choose the cycle type

GT_PIPELINE
to set the pipeline mode

Note: Some of these modes are incompatible with the turbo microcode features.

Data: The new data to set the appropriate othermode bits. These macros are the same data macros defined in gbi.h

Description

It composes an RDP 'othermode' command.This library function is used to assemble RDP "othermode" commands for turbo microcode applications.

The gspFast3D microcode presents a more user-friendly "set-and-clear" interface that hides the details of the RDP "othermode" command from the user. This interface is not available with the gspTurbo3D microcode, so this function is necessary to construct that RDP command.

Example

The render mode would usually be set with a macro from gbi.h by using code similar to this:

gDPSetRenderMode(gptr++, G_RM_OPA_SURF, G_RM_OPA_SURF2);

To construct a similar command for the turbo object state, use this code:

gtStateSetOthermode(&(state.sp.rdpOthermode), (G_RM_OPA_SURF | G_RM_OPA_SURF2));

See Also

gspTurbo3D