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

## gSPForceMatrix

Syntax

    #include <ultra64.h> /* gbi.h */
    gSPForceMatrix(Gfx *gdl, Mtx *mptr)
    gsSPForceMatrix(Mtx *mptr)

Arguments

- gdl is the display list pointer.

- mptr is the pointer to the matrix to load.

Explanation
gSPForceMatrix loads a new matrix (indicated by mptr) on to the top of the RSP's matrix stack. Without undergoing matrix multiplication, this new matrix replaces the single matrix (the concatenated matrix of the modelview and projection matrices) used for the entire transformation. There is no matrix pushing or popping on the model view and projection matrix stacks, and the tops of the stacks are not modified. If gSPMatrix follows this macro, the matrix supplied by this macro will be destroyed, so it will have no effect on the RSP's new matrix (i.e., the result will be the same as if this macro had not been used).

This is an advanced macro. You need to have a good understanding of how matrices work in the RSP microcode before using this macro. For details, see gSPMatrix and Section 11.3, "Matrix State" in the N64 Online Programming Manual.

Note
This macro does not affect lighting. Therefore, if this macro is used when light is being used, the object will be rendered in accordance with the light of the RSP matrix state prior to this macro. The object's position and orientation, however, will be determined by the matrix resulting from this macro.

For information about the matrix format, see gSPMatrix.

See Also
gSPInsertMatrix
gSPMatrix

Revision History
2/1/1999 Completely rewritten.

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 March 1999