1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXMatrixIndex</title> 10</head> 11 12<body> 13 14<h1 align="left">GXMatrixIndex</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXMatrixIndex1u8 ( u8 index ); 21void GXMatrixIndex1x8 ( u8 index ); 22</pre></dd></dl> 23 24<h2>Arguments</h2> 25<TABLE class="arguments" border="1" > 26 <tr> 27<TH>index</TH> 28<TD>Unsigned, eight-bit index to matrix memory. This number represents the first row of matrix memory where the matrix is loaded.</TD> 29 </tr> 30</TABLE> 31 32<h2>Return Values</h2> 33<P>None.</P> 34 35<H2>Description</H2> 36<P>This function is used to specify matrix index data for a vertex. It can be called only between the <a href="GXBegin.html"><code>GXBegin</code></a> function and the <a href="GXEnd.html"><code>GXEnd</code></a> function. The matrix index specifies which matrix (previously loaded into matrix memory, see the <A href="../Transform/GXLoadPosMtxImm.html"><CODE>GXLoadPosMtxImm</CODE></A>, <A href="../Transform/GXLoadNrmMtxImm.html"><CODE>GXLoadNrmMtxImm</CODE></A>, and <A href="../Transform/GXLoadTexMtxImm.html"><CODE>GXLoadTexMtxImm</CODE></A> functions for similar matrices) to use to transform this vertex's data.</P> 37<P>To use this function for a vertex, you must enable a matrix index in the <em>current vertex descriptor</em>. The current vertex descriptor is set using the <A href="GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></A> function. There is no need to set a <em>vertex attribute format</em> (<A href="GXSetVtxAttrFmt.html"><CODE>GXSetVtxAttrFmt</CODE></A>) because the index must be an unsigned eight-bit number. Both the <CODE>GXMatrixIndex1u8</CODE> and <CODE>GXMatrixIndex1x8</CODE> functions are the same.</P> 38<P>The order in which vertex functions must be called is specified in the <A href="GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></A> function. Each vertex must send attributes (position coordinates, colors, normals, and so forth) in the specified order to guarantee proper parsing by the graphics hardware.</P> 39<P>The <CODE>GXMatrixIndex1u8</CODE> (<CODE>GXMatrixIndex1x8</CODE>) function is implemented as an inline function in the non-debug version of the GX library for optimal performance. The <code>GXMatrixIndex1u8(GXMatrixIndex1x8)</code> is implemented as a regular function in the debug version of the <code>GX</code> library so the library can verify the correct order of vertex function calls between <code><a href="GXBegin.html">GXBegin</a>/<a href="GXEnd.html">GXEnd</a></code> (a common source of errors).</P> 40 41<h2>See Also</h2> 42<p class="reference"> 43<a href="GXBegin.html">GXBegin</a>, 44<a href="GXEnd.html">GXEnd</a>, 45<a href="GXSetVtxDesc.html">GXSetVtxDesc</a>, 46<a href="GXSetVtxAttrFmt.html">GXSetVtxAttrFmt</a> 47</p> 48 49<H2>Revision History</H2> 50<P> 512006/03/01 Initial version.<br> 52</P> 53 54<hr><p>CONFIDENTIAL</p></body> 55</HTML>