#include <revolution/gx.h>
void GXLoadTexMtxIndx(
u16 mtxIndx,
u32 id,
GXTexMtxType type );
| mtxIndx | Pointer to the matrix data in the array in main memory. |
|---|---|
| id | Specifies the matrix name. |
| type | Specifies the type of texture matrix. |
None.
This function loads the texture matrix indicated by the index mtxIndx from the matrix in main memory set by the next function into the matrix memory location id.
GXSetArray(GX_TEX_MTX_ARRAY, ...);
The acceptable locations for id are enumerated by GXTexMtx and GXPTTexMtx. The loaded matrix can be either 2x4 or 3x4 as indicated by type. This matrix can be used to generate texture coordinates from position coordinates, normals and input texture coordinates (see the GXSetTexCoordGen function). The matrix is loaded through the vertex cache.
The size of the matrix to load is indicated by its type. Texture matrices can be either 2x4 or 3x4. GX_MTX_2x4 matrices can be used for simple translations and/or rotations of texture coordinates. GX_MTX_3x4 matrices are used when projection is required.
Be aware that the matrix is loaded directly from main memory into the matrix memory through the vertex cache, so it will not match the CPU's cache. It is the responsibility of the application to flush any matrix data from the CPU cache (see the DCStoreRange function) before calling this function.
GXLoadTexMtxImm, GXSetTexCoordGen
2007/06/11 Clarified that the index of the post-transform texture matrix can be specified for the second argument in addition to the index of the texture matrix (also added a link).
2006/03/01 Initial version.
CONFIDENTIAL