N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

gtStateSetOthermode

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


Arguments
  • om is the pointer to the othermode word. Usually a field from gtGlobState or gtState structures.
  • mode specifies which of the following othermodes to modify. Note that some of these modes are incompatible with the turbo microcode features.

    • 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 rendermode
    • 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

  • data is the new data to set the appropriate othermode bits. These macros are the same data macros defined in gbi.h
What This Function Does
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


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.

Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998