GXLoadTexMtxImm

Syntax

#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 loaded matrix can be either a 2x4 matrix or a 3x4 matrix, as indicated by type. The usable matrix names for id are enumerated in GXTexMtx and GXPTTexMtx. 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 the GXSetTexCoordGen function 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 one 3x4 identity matrix. The GX_IDENTITY matrix is preloaded by the GXInit function.

See Also

GXSetCurrentMtx, GXLoadPosMtxImm, GXLoadNrmMtxImm, GXSetTexCoordGen

Revision History

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