1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>GXLoadTexMtxIndx</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXLoadTexMtxIndx</H1> 12<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/gx.h></CODE></PRE> 16 <DD> 17<PRE><CODE>void GXLoadTexMtxIndx( 18u16 mtxIndx, 19u32 <A href="../Enumerated_Types/GXTexMtx.html">id</A>, 20<A href="../Enumerated_Types/GXTexMtxType.html">GXTexMtxType</A> type );</CODE></PRE> 21</DL> 22<H2>Arguments</H2> 23<TABLE border="1" cellpadding="3" cellspacing="0.1"> 24 <TBODY> 25 <TR> 26<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>mtxIndx</FONT></STRONG></EM></TD> 27<TD width="520">Pointer to the matrix data in the array in main memory.</TD> 28 </TR> 29 <TR> 30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>id</FONT></STRONG></EM></TD> 31<TD width="520">Specifies the matrix <A href="../Enumerated_Types/GXTexMtx.html">name</A>.</TD> 32 </TR> 33 <TR> 34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>type</FONT></STRONG></EM></TD> 35<TD width="520">Specifies the <A href="../Enumerated_Types/GXTexMtxType.html">type</A> of texture matrix.</TD> 36 </TR> 37 </TBODY> 38</TABLE> 39<H2>Return Values</H2> 40<P>None.</P> 41<H2>Description</H2> 42<P>This function loads the texture matrix indicated by the index <CODE><EM><STRONG>mtxIndx</STRONG></EM></CODE> from the matrix in main memory set by the next function into the matrix memory location <CODE><EM><STRONG>id</STRONG></EM></CODE>.</P> 43<P><code><a href="../Geometry/GXSetArray.html">GXSetArray</a>(GX_TEX_MTX_ARRAY, ...);</code></P> 44<P>The accepted locations for <em><strong><code>id</code></strong></em> are enumerated by <a href="../Enumerated_Types/GXTexMtx.html"><code>GXTexMtx</code></a>. The loaded matrix can be either 2x4 or 3x4 as indicated by <em><strong><code>type</code></strong></em>. This matrix can be used to generate texture coordinates from positions, normals, and input texture coordinates (see <a href="../TexCoordGen/GXSetTexCoordGen.html"><code>GXSetTexCoordGen</code></a>). The matrix is loaded through the vertex cache.</P> 45<P>The size of the matrix to load is indicated by its <code><em><strong>type</strong></em></code>. Texture matrices can be either 2x4 or 3x4. <code>GX_MTX_2x4</code> matrices can be used for simple translations and/or rotations of texture coordinates. <code>GX_MTX_3x4</code> matrices are used when projection is required.</P> 46<P><B>Note:</B> 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 <a href="../../os/Cache/DCStoreRange.html"><code>DCStoreRange</code></a>) before calling this function.</P> 47<H2>See Also</H2> 48<P><a href="GXLoadTexMtxImm.html">GXLoadTexMtxImm</a><br> <a href="../TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</a><a href="../TexCoordGen/GXSetTexCoordGen2.html"><br> GXSetTexCoordGen2</a></P> 49<H2>Revision History</H2> 50<P>03/01/2006 Initial version.</P> 51</BODY> 52</HTML>