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>GXLoadTexMtxImm</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXLoadTexMtxImm</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gx.h&gt;
16
17void GXLoadTexMtxImm(
18     f32             mtxPtr[][4],
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>mtxPtr</TH>
28<TD>Specifies a pointer to the matrix data.</TD>
29    </TR>
30    <TR>
31<TH>id</TH>
32<TD>Specifies the matrix name.&nbsp;</TD>
33    </TR>
34    <TR>
35<TH>type</TH>
36<TD>matrix type</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 a texture matrix, <SPAN class="argument">mtxPtr</SPAN>, into the matrix memory at location, <SPAN class="argument">id</SPAN>. The loaded matrix can be either a 2x4 matrix or a 3x4 matrix, as indicated by <SPAN class="argument">type</SPAN>. The usable matrix names for <SPAN class="argument">id</SPAN> are enumerated in <A href="../Enumerated_Types/GXTexMtx.html"><CODE>GXTexMtx</CODE></A> and <a href="../Enumerated_Types/GXPTTexMtx.html"><CODE>GXPTTexMtx</CODE></a>. You can use the loaded matrix to transform texture coordinates, or to generate texture coordinates from position or normal vectors.&nbsp;Such generated texture coordinates are used for projected textures, reflection mapping, etc.&nbsp;See the <A href="../TexCoordGen/GXSetTexCoordGen.html"><CODE>GXSetTexCoordGen</CODE></A> function for more details.</P>
46<P>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>
47<P>The default matrix memory configuration allows for ten (3x4 or 2x4) texture matrices, and one 3x4 identity matrix. The <CODE>GX_IDENTITY</CODE> matrix is preloaded by the <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function.</P>
48
49<H2>See Also</H2>
50<P class="reference">
51<A href="GXSetCurrentMtx.html">GXSetCurrentMtx</A>,
52<A href="GXLoadPosMtxImm.html">GXLoadPosMtxImm</A>,
53<A href="GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</A>,
54<A href="../TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</A>
55</P>
56
57<H2>Revision History</H2>
58<P>
592007/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>
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</HTML>