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 http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css">
8<TITLE>DL-tf-mtx</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">DL-tf-mtx</H1>
12
13<H2>Description</H2>
14<P>This program demonstrates the display list capability which includes matrix load commands. Matrix load APIs are APIs that you can use safely inside display lists. (You can call these APIs between <a href="../../../gx/DisplayList/GXBeginDisplayList.html"><code>GXBeginDisplayList</code></a> and <a href="../../../gx/DisplayList/GXEndDisplayList.html"><code>GXEndDisplayList</code></a>.) Matrix load commands that reference index, such as <a href="../../../gx/Transform/GXLoadPosMtxIndx.html"><code>GXLoadPosMtxIndx</code></a>, are compatible with display lists because they load matrix data from the main memory when the display list is called.</P>
15<P>This demo displays a snake model that contains 100 bones. Since the graphics hardware is limited to 10 matrix slots, you should frequently replace matrices to display these types of objects. This limitation might force you to divide the model into multiple pieces and repeatedly call matrix load commands and geometry primitives one after the other. However, it is possible to put the entire model into one display list by using indexed matrix load functions inside the display list. The snake model demo is packed into one display list, which is animated by updating the matrix array in every frame.</P>
16
17<H2>Coverage</H2>
18<P>Display list functions.</P>
19<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
20  <TBODY>
21    <TR>
22<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD>
23<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD>
24<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD>
25    </TR>
26    <TR>
27<TD width="30%"><A href="../../../gx/DisplayList/GXBeginDisplayList.html"><CODE>GXBeginDisplayList</CODE></A></TD>
28<TD width="25%"><SPAN class="argument">list</SPAN>, <SPAN class="argument">size</SPAN></TD>
29<TD width="45%">An appropriate data pointer/size.</TD>
30    </TR>
31    <TR>
32<TD width="30%"><CODE><A href="../../../gx/DisplayList/GXEndDisplayList.html">GXEndDisplayList</A></CODE></TD>
33<TD width="25%">None.</TD>
34      <TD width="45%"> </TD>
35    </TR>
36    <TR>
37<TD width="30%"><CODE><A href="../../../gx/DisplayList/GXCallDisplayList.html">GXCallDisplayList</A></CODE></TD>
38<TD width="25%"><SPAN class="argument">list</SPAN>, <SPAN class="argument">nbytes</SPAN></TD>
39<TD width="45%">An appropriate data pointer/size.</TD>
40    </TR>
41  </TBODY>
42</TABLE>
43<P>Called inside a display list.</P>
44<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
45  <TBODY>
46    <TR>
47<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD>
48<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD>
49<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD>
50    </TR>
51    <TR>
52<TD width="30%" rowspan="2"><A href="../../../gx/Transform/GXLoadPosMtxIndx.html"><CODE>GXLoadPosMtxIndx</CODE></A></TD>
53<TD width="25%">Input source matrix index.</TD>
54      <TD width="45%">0 - 99</TD>
55    </TR>
56    <TR>
57<TD width="25%">Destination matrix ID</TD>
58<TD width="45%"><CODE>GX_PNMTX0</CODE> - <CODE>GX_PNMTX9</CODE></TD>
59    </TR>
60    <TR>
61<TD width="30%" rowspan="2"><A href="../../../gx/Transform/GXLoadNrmMtxIndx3x3.html"><CODE>GXLoadNrmMtxIndx3x3</CODE></A></TD>
62<TD width="25%">Input source matrix index.</TD>
63      <TD width="45%">0 - 99</TD>
64    </TR>
65    <TR>
66<TD width="25%">Destination matrix ID</TD>
67<TD width="45%"><CODE>GX_PNMTX0</CODE> - <CODE>GX_PNMTX9</CODE></TD>
68    </TR>
69    <TR>
70<TD width="30%" rowspan="3"><A href="../../../gx/Transform/GXLoadTexMtxIndx.html"><CODE>GXLoadTexMtxIndx</CODE></A></TD>
71<TD width="25%">Input source matrix index.</TD>
72      <TD width="45%">0 - 99</TD>
73    </TR>
74    <TR>
75<TD width="25%">Destination matrix ID</TD>
76<TD width="45%"><CODE>GX_TEXMTX0</CODE> - <CODE>GX_TEXMTX9</CODE></TD>
77    </TR>
78    <TR>
79<TD width="25%">Matrix type.</TD>
80<TD width="45%"><CODE>GX_MTX2x4</CODE></TD>
81    </TR>
82  </TBODY>
83</TABLE>
84
85<H2>Using the Demo</H2>
86<P>The Control Stick manipulates the path of the snake model.<BR>The substick controls global rotation of the snake model.<BR>The A button resets the model position.<BR>The B button stops the animation.<BR>START exits the test.</P>
87
88<H2>Snapshot</H2>
89<P><IMG src="./images/DL-tf-mtx0.jpg" alt="DL-tf-mtx0.jpg (6533 bytes)" width="640" height="448"></P>
90<P><IMG src="./images/DL-tf-mtx1.jpg" alt="DL-tf-mtx1.jpg (8716 bytes)" width="640" height="448"></P>
91
92<H2>Required Data Files</H2>
93<P><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTest/tf-02.tpl</CODE> is required.</P>
94
95<H2>Revision History</H2>
96<P>
972006/03/01 Initial version.<br>
98</P>
99
100<hr><p>CONFIDENTIAL</p></body>
101</HTML>