#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 accepted locations for id are enumerated by GXTexMtx. The loaded matrix can be either 2x4 or 3x4 as indicated by type. This matrix can be used to generate texture coordinates from positions, normals, and input texture coordinates (see GXSetTexCoordGen). 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.
Note: The matrix is loaded directly from main memory into the matrix memory through the vertex cache, so it is incoherent with the CPU's cache. It's the application's responsibility to flush any matrix data from the CPU cache (see DCStoreRange) before calling this function.
GXLoadTexMtxImm
GXSetTexCoordGen
GXSetTexCoordGen2
03/01/2006 Initial version.