GXLoadPosMtxImm

C Specification

#include <revolution/gx.h>
void GXLoadPosMtxImm(
    const f32   mtxPtr[3][4], 
    u32         id );

Arguments

mtxPtr Specifies a pointer to the matrix data.
id Specifies the matrix name. Can specify a value enumerated by GXPosNrmMtx.

Return Values

None.

Description

This function is used to load a 3x4 modelview matrix mtxPtr into matrix memory at location id. This matrix is used for converting vertex coordinate in model space to view space, either by making the matrix the current one (see GXSetCurrentMtx function), or by setting a matrix id for each vertex. id indicates the location in the matrix memory, enumerated by GXPosNrmMtx

You can also load a normal matrix (GXLoadNrmMtxImm or GXLoadNrmMtxIndx3x3) to the same id. Generally, the normal matrix will be the inverse transpose of the position matrix. The normal matrix is used for vertex lighting. In cases where the modelview and inverse transpose of the modelview (excluding translation) are the same, you can load the same matrix for both position and normal transforms.

The matrix data is copied from DRAM through the CPU cache into the graphics FIFO,  so matrices loaded using this function are always coherent with the CPU cache.

See Also

GXSetCurrentMtx
GXLoadNrmMtxImm

Revision History

2006/03/01 Initial version.


CONFIDENTIAL