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

Format
#include "gbi.h"

gSPForceMatrix(Gfx *gdl, Mtx *mptr)
gsSPForceMatrix(Mtx *mptr)
Arguments
  • gdl is the pointer to the graphics display list
  • mptr is the pointer to the matrix to load (see note below about format)
What This Macro Does
This is an advanced macro. You need to have a good understanding of how matrices work in the RSP microcode before using this macro (see gSPMatrix).

This macro loads a new matrix (pointed to by mptr) into the top of the RSP's matrix stacks. It bypasses any matrix multiplication and replaces the concatenated MODELVIEW and PROJECTION matrix with a single matrix that is used for the entire transformation. It does not push or pop any matrices onto or off of the MODELVIEW or PROJECTION matrix stacks, nor does it modify the top of these stacks. If this macro is followed by a gSPMatrix macro, the matrix supplied will be lost and will not affect the new matrix on the RSP; it is as though gSPForceMatrix was never called.

Important Note
The gSPForceMatrix macro does not affect lighting. Therefore, if you are using lighting and you use the gSPForceMatrix macro, the lights will act on a rendered object according to the RSP's matrix state preceding the gSPForceMatrix macro, but the object's position and orientation will be determined by the matrix sent by the gSPForceMatrix macro.

Matrix Format
Please see the note on Matrix Format in the gSPMatrix page.

See Also
gSPMatrix
gSPInsertMatrix



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