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="../../DisplayList/GXBeginDisplayList.html"><font face="Courier New"><code>GXBeginDisplayList</code></font></a> and <a href="../../DisplayList/GXEndDisplayList.html"><font face="Courier New"><code>GXEndDisplayList</code></font></a>.) Matrix load commands that reference index, like <a href="../../Transform/GXLoadPosMtxIndx.html"><font face="Courier New"><code>GXLoadPosMtxIndx</code></font></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 which 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, putting the entire model into one display list by using indexed matrix load functions inside the display list is possible. The snake model demo is packed into one display list, which is animated by updating the matrix array in every frame.</P> 16<H2>Coverage</H2> 17<P>Display list functions.</P> 18<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 19 <TBODY> 20 <TR> 21<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Function</STRONG></EM></TD> 22<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 23<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 24 </TR> 25 <TR> 26<TD width="30%"><A href="../../../gx/DisplayList/GXBeginDisplayList.html"><CODE>GXBeginDisplayList</CODE></A></TD> 27<TD width="25%">list, size</TD> 28<TD width="45%">An appropriate data pointer/size.</TD> 29 </TR> 30 <TR> 31<TD width="30%"><CODE><A href="../../../gx/DisplayList/GXEndDisplayList.html">GXEndDisplayList</A></CODE></TD> 32<TD width="25%">None.</TD> 33 <TD width="45%"></TD> 34 </TR> 35 <TR> 36<TD width="30%"><CODE><A href="../../../gx/DisplayList/GXCallDisplayList.html">GXCallDisplayList</A></CODE></TD> 37<TD width="25%">list, size</TD> 38<TD width="45%">An appropriate data pointer/size.</TD> 39 </TR> 40 </TBODY> 41</TABLE> 42<P>Called inside a display list.</P> 43<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 44 <TBODY> 45 <TR> 46<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Function</STRONG></EM></TD> 47<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 48<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 49 </TR> 50 <TR> 51<TD width="30%" rowspan="2"><A href="../../../gx/Transform/GXLoadPosMtxIndx.html"><CODE>GXLoadPosMtxIndx</CODE></A></TD> 52<TD width="25%">Input source matrix index.</TD> 53 <TD width="45%">0 - 99</TD> 54 </TR> 55 <TR> 56<TD width="25%">Destination matrix ID</TD> 57<TD width="45%"><FONT face="Courier New">GX_PNMTX0</FONT> - <FONT face="Courier New">GX_PNMTX9</FONT></TD> 58 </TR> 59 <TR> 60<TD width="30%" rowspan="2"><A href="../../../gx/Transform/GXLoadNrmMtxIndx3x3.html"><CODE>GXLoadNrmMtxIndx3x3</CODE></A></TD> 61<TD width="25%">Input source matrix index.</TD> 62 <TD width="45%">0 - 99</TD> 63 </TR> 64 <TR> 65<TD width="25%">Destination matrix ID</TD> 66<TD width="45%"><FONT face="Courier New">GX_PNMTX0</FONT> - <FONT face="Courier New">GX_PNMTX9</FONT></TD> 67 </TR> 68 <TR> 69<TD width="30%" rowspan="3"><A href="../../../gx/Transform/GXLoadTexMtxIndx.html"><CODE>GXLoadTexMtxIndx</CODE></A></TD> 70<TD width="25%">Input source matrix index.</TD> 71 <TD width="45%">0 - 99</TD> 72 </TR> 73 <TR> 74<TD width="25%">Destination matrix ID</TD> 75<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT> - <FONT face="Courier New">GX_TEXMTX9</FONT></TD> 76 </TR> 77 <TR> 78<TD width="25%">Matrix type</TD> 79<TD width="45%"><FONT face="Courier New">GX_MTX2x4.</FONT></TD> 80 </TR> 81 </TBODY> 82</TABLE> 83<H2>Operation Method</H2> 84<P>The Control Stick manipulates the path of the snake model. The C Stick controls global rotation of the snake model. The A button resets the model position.<br>The B button stops the animation. START exits the test.</P> 85<H2>Snapshot</H2> 86<P><IMG src="./images/DL-tf-mtx0.jpg" alt="DL-tf-mtx0.jpg (6533 bytes)" width="640" height="448"></P> 87<P><IMG src="./images/DL-tf-mtx1.jpg" alt="DL-tf-mtx1.jpg (8716 bytes)" width="640" height="448"></P> 88<H2>Required Data Files</H2> 89<P><FONT face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTest/tf-02.tpl</FONT> is required.</P> 90<H2>Revision History</H2> 91<P>03/01/2006 Initial version.</P> 92</BODY> 93</HTML>