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>GXLoadPosMtxIndx</title>
10</head>
11
12<body>
13
14<h1 align="left">GXLoadPosMtxIndx</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXLoadPosMtxIndx(
21    u16     mtxIndx,
22    u32     <a href="../Enumerated_Types/GXPosNrmMtx.html">id</a> );
23</pre></dd></dl>
24
25<h2>Arguments</h2>
26<TABLE class="arguments" border="1" >
27  <tr>
28<TH>mtxIndx</TH>
29<TD>Specifies the index to the matrix data in the main memory.</TD>
30  </tr>
31  <tr>
32<TH>id</TH>
33<TD>Specifies the matrix name. Can specify a value enumerated by <CODE><A href="../Enumerated_Types/GXPosNrmMtx.html">GXPosNrmMtx</CODE></A>.</TD>
34  </tr>
35</TABLE>
36
37<h2>Return Values</h2>
38<p>None.</p>
39
40<H2>Description</H2>
41<P>This function loads the 3x4 matrix model view matrix indicated by the index <SPAN class="argument">mtxIndx</SPAN> from the array in main memory set by the function described next into the matrix memory location <SPAN class="argument">id</SPAN>.</P>
42<P><code><a href="../Geometry/GXSetArray.html">GXSetArray</a>(GX_POS_MTX_ARRAY, ...);</code></P>
43<P>The applicable <SPAN class="argument">id</SPAN> memory location is described by the <A href="../Enumerated_Types/GXPosNrmMtx.html"><CODE>GXPosNrmMtx</CODE></A> enumeration. This modelview matrix is either made the current matrix (see the <A href="GXSetCurrentMtx.html"><CODE>GXSetCurrentMtx</CODE></A> function), or used to transform vertex coordinates in model space to view space by setting a matrix ID for each vertex (see the <A href="../Geometry/GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></A> function). The matrix will be loaded through the vertex cache.</P>
44<P>You can also load a normal matrix (the <A href="GXLoadNrmMtxImm.html"><CODE>GXLoadNrmMtxImm</CODE></A> or <A href="GXLoadNrmMtxIndx3x3.html"><CODE>GXLoadNrmMtxIndx3x3</CODE></A> function) to the same <SPAN class="argument">id</SPAN>. Usually the normal matrix will be the inverse transpose of the modelview matrix. The normal matrix is used for <a href="../../gx/list.html#Lighting">vertex lighting</a>. In cases where the inverse transpose of the modelview and the modelview matrix are the same (excluding translation), you can load the <em>same</em> matrix for both the normal and the position matrix.&nbsp;Since indexed matrix loads are through the vertex cache, you will only incur the main memory bandwidth of one matrix load.&nbsp;</P>
45<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>
46
47<h2>See Also</h2>
48<p class="reference">
49<a href="GXSetCurrentMtx.html">GXSetCurrentMtx</a>,
50<a href="GXLoadNrmMtxImm.html">GXLoadNrmMtxImm</a>,
51<a href="GXLoadNrmMtxIndx3x3.html">GXLoadNrmMtxIndx3x3</a>,
52<a href="GXLoadPosMtxImm.html">GXLoadPosMtxImm</a>
53</p>
54
55<H2>Revision History</H2>
56<P>
572006/03/01 Initial version.<br>
58</P>
59
60<hr><p>CONFIDENTIAL</p></body>
61</HTML>