#include <revolution/gx.h>void GXLoadNrmMtxIndx3x3(
u16 mtxIndx,
u32 id );
mtxIndx |
Specifies the index to the matrix data in the main memory array. |
id |
Specifies the matrix name. Can specify a value enumerated in GXPosNrmMtx. |
None.
This function will load a 3x3 normal matrix into matrix memory at location id from a 3x3 matrix located at index mtxIndx from the array in main memory set by:
GXSetArray(GX_NRM_MTX_ARRAY, ...);
This matrix can be used to transform normals in model space to view space, either by making the matrix the current one (see GXSetCurrentMtx), or by setting a matrix id for each vertex (see GXSetVtxDesc). The valid locations for id are enumerated in GXPosNrmMtx. The matrix will be loaded through the vertex cache.
You can also load a position matrix (GXLoadPosMtxImm or GXLoadPosMtxIndx) to the same id.
You cannot use an indexed load to load a 3x3 matrix from an indexed 3x4 matrix in main memory. You must use GXLoadNrmMtxImm for this case.
Note: The matrix does not match the CPU's 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 DCStoreRange) before calling this function.
GXSetCurrentMtx
GXLoadNrmMtxImm
GXLoadPosMtxImm
GXLoadPosMtxIndx
03/01/2006 Initial version