GXLoadNrmMtxIndx3x3

Syntax

#include <revolution/gx.h>

void GXLoadNrmMtxIndx3x3(
    u16     mtxIndx, 
    u32     id );

Arguments

mtxIndx Specifies the index to the array data in the main memory array.
id Specifies the array name. Can specify a value enumerated in GXPosNrmMtx.

Return Values

None.

Description

This function will load a 3x3 normal matrix into matrix memory at location id based on a 3x3 matrix mtxPtr indicated by the index mtxIndx from the array in main memory set by the function indicated below.

GXSetArray(GX_NRM_MTX_ARRAY, ...);

This matrix can either be made the current matrix (see the GXSetCurrentMtx function), or be used to transform normals in model space to view space by setting a matrix ID for each vertex (see the GXSetVtxDesc function). The valid locations for id are enumerated in GXPosNrmMtx. The matrix will be loaded through the vertex cache.

You can also load a position coordinate matrix (the GXLoadPosMtxImm or GXLoadPosMtxIndx function) to the same id.

To load a 3x3 matrix from an indexed 3x4 matrix in main memory, use the GXLoadNrmMtxImm function.

Note:Be aware that the matrix is not coherent with the CPU cache because it is loaded directly from main memory into the matrix memory through the vertex cache. It's the application's responsibility to flush any matrix data from the CPU cache (see the DCStoreRange function) before calling this function.

See Also

GXSetCurrentMtx, GXLoadNrmMtxImm, GXLoadPosMtxImm, GXLoadPosMtxIndx

Revision History

2008/05/12 Corrected a mistaken function name.
2006/03/01 Initial version.


CONFIDENTIAL