GXLoadTexMtxIndx

C Specification

#include <revolution/gx.h>
void GXLoadTexMtxIndx(
    u16          mtxIndx, 
    u32          id,
    GXTexMtxType type );

Arguments

mtxIndx Pointer to the matrix data in the array in main memory.
id Specifies the matrix name. 
type Specifies the type of texture matrix.

Return Values

None.

Description

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 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.

See Also

GXLoadTexMtxImm
GXSetTexCoordGen
GXSetTexCoordGen2

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