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 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXLoadTexMtxIndx( 18 u16 mtxIndx, 19 u32 id, 20 <A href="../Enumerated_Types/GXTexMtxType.html">GXTexMtxType</A> type ); 21</pre></dd></dl> 22 23<H2>Arguments</H2> 24<TABLE class="arguments" border="1" > 25 <TBODY> 26 <TR> 27<TH>mtxIndx</TH> 28<TD>Pointer to the matrix data in the array in main memory.</TD> 29 </TR> 30 <TR> 31<TH>id</TH> 32<TD>Specifies the matrix name. </TD> 33 </TR> 34 <TR> 35<TH>type</TH> 36<TD>Specifies the <A href="../Enumerated_Types/GXTexMtxType.html">type</A> of texture matrix.</TD> 37 </TR> 38 </TBODY> 39</TABLE> 40 41<H2>Return Values</H2> 42<P>None.</P> 43 44<H2>Description</H2> 45<P>This function loads the texture matrix indicated by the index <SPAN class="argument">mtxIndx</SPAN> from the matrix in main memory set by the next function into the matrix memory location <SPAN class="argument">id</SPAN>.</P> 46<P><code><a href="../Geometry/GXSetArray.html">GXSetArray</a>(GX_TEX_MTX_ARRAY, ...);</code></P> 47<P>The acceptable locations for <SPAN class="argument">id</SPAN> are enumerated by <A href="../Enumerated_Types/GXTexMtx.html"><CODE>GXTexMtx</CODE></A> and <a href="../Enumerated_Types/GXPTTexMtx.html"><CODE>GXPTTexMtx</CODE></a>. The loaded matrix can be either 2x4 or 3x4 as indicated by <SPAN class="argument">type</SPAN>. This matrix can be used to generate texture coordinates from position coordinates, normals and input texture coordinates (see the <A href="../TexCoordGen/GXSetTexCoordGen.html"><CODE>GXSetTexCoordGen</CODE></A> function). The matrix is loaded through the vertex cache.</P> 48<P>The size of the matrix to load is indicated by its <SPAN class="argument">type</SPAN>. 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> 49<P>Be aware that the matrix is loaded directly from main memory into the matrix memory through the vertex cache, so it will not match the CPU's cache. It is the responsibility of the application to flush any matrix data from the CPU cache (see the <A href="../../os/Cache/DCStoreRange.html"><CODE>DCStoreRange</CODE></A> function) before calling this function.</P> 50 51<H2>See Also</H2> 52<P class="reference"> 53<A href="GXLoadTexMtxImm.html">GXLoadTexMtxImm</A>, 54<A href="../TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</A> 55</P> 56 57<H2>Revision History</H2> 58<P>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).<br>2006/03/01 Initial version.<br> 59</P> 60 61<hr><p>CONFIDENTIAL</p></body> 62</HTML>