GXLoadTexMtxImm

C Specification

#include <revolution/gx.h>
void GXLoadTexMtxImm(
f32             mtxPtr[][4],
u32             id, 
GXTexMtxType    type );

Arguments

mtxPtr Specifies a pointer to the matrix data.
id Specifies the matrix name.
type matrix type.

Return Values

None.

Description

This function loads a texture matrix mtxPtr into the matrix memory at location id. The matrix loaded can be either a 2x4 or 3x4 matrix as indicated by type. The allowed values of id are enumerated in GXTexMtx. You can use the loaded matrix to transform texture coordinates, or to generate texture coordinates from position or normal vectors. Such generated texture coordinates are used for projected textures, reflection mapping, etc. See GXSetTexCoordGen for more details.

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.

The default matrix memory configuration allows for ten (3x4 or 2x4) texture matrices, and a 3x4 identity matrix. The GX_IDENTITY matrix is preloaded by GXInit.

See Also

GXSetCurrentMtx
GXLoadPosMtxImm
GXLoadNrmMtxImm
GXSetTexCoordGen

Revision History

03/01/2006 Initial version.