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>tex-tlut</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">tex-tlut</H1> 12 13<H2>Description</H2> 14<P>This program can test color indexed textures with an arbitrary TLUT size. Appropriate color maps are generated at runtime and loaded into the TLUT. Two textured panels are displayed onscreen. One panel displays all the components of the generated color map and the other panel displays a sample image quantized by the color map. The user can control TLUT size, format, and other parameters to control color map generation.</P> 15 16<H2>Coverage</H2> 17<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 18 <TBODY> 19 <TR> 20<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD> 21<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 22<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 23 </TR> 24 <TR> 25<TD width="30%" rowspan="6"><A href="../../../gx/Texture/GXInitTexObjCI.html"><CODE>GXInitTexObjCI</CODE></A></TD> 26<TD width="25%"><SPAN class="argument">Pointer to image data.</SPAN></TD> 27<TD width="45%">Appropriate value.</TD> 28 </TR> 29 <TR> 30<TD width="25%"><SPAN class="argument">Width and height</SPAN></TD> 31<TD width="45%">Power of 2 only.</TD> 32 </TR> 33 <TR> 34<TD width="25%"><SPAN class="argument">Format</SPAN></TD> 35<TD width="45%"><STRONG><CODE>GX_TF_C4</CODE>, <CODE>GX_TF_C8</CODE>, <CODE>GX_TF_C14X2</CODE></STRONG></TD> 36 </TR> 37 <TR> 38<TD width="25%"><SPAN class="argument">Wrap mode (s, t).</SPAN></TD> 39<TD width="45%">Always <CODE>GX_REPEAT</CODE>.</TD> 40 </TR> 41 <TR> 42<TD width="25%"><SPAN class="argument">Mipmap</SPAN></TD> 43<TD width="45%">Always <CODE>GX_FALSE</CODE>.</TD> 44 </TR> 45 <TR> 46<TD width="25%"><SPAN class="argument">TLUT name</SPAN></TD> 47<TD width="45%"><STRONG>All self-defined values</STRONG></TD> 48 </TR> 49 <TR> 50<TD width="30%"><A href="../../../gx/Texture/GXLoadTexObj.html"><CODE><CODE>GXLoadTexObj</CODE></CODE></A></TD> 51<TD width="25%"><SPAN class="argument">Destination texture name.</SPAN></TD> 52<TD width="45%">Always <CODE>GX_TEXMAP0</CODE>.</TD> 53 </TR> 54 <TR> 55<TD width="30%" rowspan="3"><A href="../../../gx/Texture/GXInitTlutObj.html"><CODE>GXInitTlutObj</CODE></A></TD> 56<TD width="25%"><SPAN class="argument">Pointer to data.</SPAN></TD> 57<TD width="45%">Appropriate value.</TD> 58 </TR> 59 <TR> 60<TD width="25%"><SPAN class="argument">Format</SPAN></TD> 61<TD width="45%"><STRONG><CODE>GX_TL_IA8</CODE>, <CODE>GX_TL_RGB565</CODE>, <CODE>GX_TL_RGB5A3</CODE></STRONG></TD> 62 </TR> 63 <TR> 64<TD width="25%"><SPAN class="argument">Number of Entries</SPAN></TD> 65<TD width="45%">Same as the texture region size.</TD> 66 </TR> 67 <TR> 68<TD width="30%"><A href="../../../gx/Texture/GXLoadTlut.html"><CODE>GXLoadTlut</CODE></A></TD> 69<TD width="25%"><SPAN class="argument">Destination TLUT name.</SPAN></TD> 70<TD width="45%"><STRONG>All self-defined values</STRONG></TD> 71 </TR> 72 <TR> 73<TD width="30%" rowspan="2"><A href="../../../gx/Texture/GXInitTlutRegion.html"><CODE>GXInitTlutRegion</CODE></A></TD> 74<TD width="25%"><SPAN class="argument">TMEM address</SPAN></TD> 75<TD width="45%">Appropriate address</TD> 76 </TR> 77 <TR> 78<TD width="25%"><SPAN class="argument">Table size</SPAN></TD> 79<TD width="45%"><STRONG><CODE>GX_TLUT_16</CODE> - <CODE>GX_TLUT_4K</CODE></STRONG></TD> 80 </TR> 81 <TR> 82<TD width="30%"><A href="../../../gx/Texture/GXSetTlutRegionCallback.html"><CODE>GXSetTlutRegionCallBack</CODE></A></TD> 83<TD width="25%"><SPAN class="argument">Callback Functions</SPAN></TD> 84<TD width="45%">One function</TD> 85 </TR> 86 <TR> 87<TD width="30%" rowspan="4"><A href="../../../gx/Texture/GXGetTexBufferSize.html"><CODE>GXGetTexBufferSize</CODE></A></TD> 88<TD width="25%"><SPAN class="argument">Width and height</SPAN></TD> 89<TD width="45%">Power of 2 only.</TD> 90 </TR> 91 <TR> 92<TD width="25%"><SPAN class="argument">Format</SPAN></TD> 93<TD width="45%"><CODE>GX_TF_C4</CODE>, <CODE>GX_TF_C8</CODE>, <CODE>GX_TF_C14X2</CODE></TD> 94 </TR> 95 <TR> 96<TD width="25%"><SPAN class="argument">Mipmap</SPAN></TD> 97<TD width="45%">Always <CODE>GX_FALSE</CODE>.</TD> 98 </TR> 99 <TR> 100<TD width="25%"><SPAN class="argument">Max LOD</SPAN></TD> 101<TD width="45%">N/A</TD> 102 </TR> 103 <TR> 104<TD width="30%" rowspan="2"><A href="../../../gx/Tev/GXSetTevOp.html"><CODE>GXSetTevOp</CODE></A></TD> 105<TD width="25%"><SPAN class="argument">TEV stage ID.</SPAN></TD> 106<TD width="45%">Always <CODE>GX_TEVSTAGE0</CODE>.</TD> 107 </TR> 108 <TR> 109<TD width="25%"><SPAN class="argument">Operation mode</SPAN></TD> 110<TD width="45%">Always <CODE>GX_REPLACE</CODE>.</TD> 111 </TR> 112 <TR> 113<TD width="30%"><A href="../../../gx/ColorFormat/GXPackedRGB565.html"><CODE>GXPackedRGB565</CODE></A></TD> 114<TD width="25%"><SPAN class="argument">r, g, b</SPAN></TD> 115<TD width="45%">Various values.</TD> 116 </TR> 117 <TR> 118<TD width="30%"><A href="../../../gx/ColorFormat/GXPackedRGB5A3.html"><CODE>GXPackedRGB5A3</CODE></A></TD> 119<TD width="25%"><SPAN class="argument">r, g, b, a</SPAN></TD> 120<TD width="45%">Various values.</TD> 121 </TR> 122 </TBODY> 123</TABLE> 124 125<H2>Using the Demo</H2> 126<P>START exits the test.</P> 127<P>The L and R Buttons change the color entry (= TLUT size) number.<BR>The number becomes a power of 2 (from 16 through 4096.)</P> 128<P>The A Button changes the format of the TLUT.<BR>The color map will also change.</P> 129<P>The Control Stick changes parameters for controlling the color map. The bit size for a color component (R, G, B, I, A) will change.</P> 130 131<H2>Snapshot</H2> 132<P>C4 texture format. Tlut size = 16, Tlut format = IA8, I2A2 color map.</P> 133<P><IMG src="./images/tex-tlut-0.jpg" alt="tex-tlut-0.jpg (13286 bytes)" width="320" height="240"></P> 134 135<P>C8 texture format. Tlut size = 256, Tlut format = RGB565, R3G3B2 color map.</P> 136<P><IMG src="./images/tex-tlut-4.jpg" alt="tex-tlut-4.jpg (16249 bytes)" width="320" height="240"></P> 137 138<P>C14X2 texture format. Tlut size = 4096, Tlut format = RGB5A3, R3G3B3A3 color map.</P> 139<P><IMG src="./images/tex-tlut-8.jpg" alt="tex-tlut-8.jpg (19127 bytes)" width="320" height="240"></P> 140 141<H2>Data Files Required</H2> 142<P>None.</P> 143 144<H2>Revision History</H2> 145<P> 1462006/03/01 Initial version.<br> 147</P> 148 149<hr><p>CONFIDENTIAL</p></body> 150</HTML>