#include <revolution/gx.h>void GXMatrixIndex1u8 ( u8 index );
void GXMatrixIndex1x8 ( u8 index );index |
Unsigned, eight-bit index to matrix memory. This number represents the first row of matrix memory where the matrix is loaded. |
None.
This function is used to specify matrix index data for a vertex. It can only be called between GXBegin and GXEnd. The matrix index specifies which matrix (previously loaded into matrix memory, see GXLoadPosMtxImm, GXLoadNrmMtxImm, and GXLoadTexMtxImm) to use to transform this vertex's data.
To use this function for a vertex, you must enable a matrix index in the current vertex descriptor. The current vertex descriptor is set using GXSetVtxDesc. There is no need to set a vertex attribute format (GXSetVtxAttrFmt) because the index must be an unsigned eight-bit number. Both GXMatrixIndex1u8 and GXMatrixIndex1x8 are identical.
The order in which vertex functions must be called is specified by GXSetVtxDesc. Each vertex must send attributes (positions, colors, normals, etc.) in the specified order to guarantee proper interpretation by the graphics hardware.
The GXMatrixIndex1u8(GXMatrixIndex1x8) is implemented as an inline function in the non-debug version of the GX library for optimal performance. The GXMatrixIndex1u8(GXMatrixIndex1x8) is implemented as a regular function in the debug version of the GX library so the library can verify the correct order of vertex function calls between GXBegin/GXEnd (a common source of errors).
GXBegin
GXEnd
GXSetVtxDesc
GXSetVtxAttrFmt
2006/03/01 Initial version.
CONFIDENTIAL