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>geo-vtx-fmt</title>
10</head>
11
12<body>
13
14<h1 align="left">geo-vtx-fmt</h1>
15
16<h2>Description</h2>
17
18<P><font face="Courier New">geo-vtx-fmt</font> tests many of the basic functionalities of the graphics pipeline. This test uses the vertex coordinate, color, texture coordinate 0, and geometry (for example, a normal line) attributes. These four attributes are tested with the<CODE>GXVertex</CODE>, <CODE>GXSetArray</CODE>, <CODE>GXSetVtxDesc</CODE>, and <CODE>GXSetVtxAttrFmt</CODE> functions. This demo also tests alpha blending (all cubes have an alpha gradient on one face when the color is valid) and all possible geometric primitives.</P>
19<h2>Coverage</h2>
20<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
21  <tr>
22<TD width="30%" bgcolor="#C0C0C0"><em><strong>Function</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%" rowspan="2">
28<CODE><a href="../../../gx/Geometry/GXPosition.html"><FONT face="Courier New">GXPosition</FONT></a><br> <a href="../../../gx/Geometry/GXColor.html"><FONT face="Courier New">GXColor</FONT></a><br> <a href="../../../gx/Geometry/GXNormal.html"><FONT face="Courier New">GXNormal</FONT></a><br> <a href="../../../gx/Geometry/GXTexCoord.html"><FONT face="Courier New">GXTexCoord</FONT></a></CODE></TD>
29<TD width="25%"><font face="Courier New"><em><strong>Vertex attribute</strong></em></font></TD>
30<TD width="45%"><font face="Courier New">GX_VA_POS</font>, <font     face="Courier New">GX_VA_NRM</font>, <font face="Courier New">GX_VA_CLR0</font>, <font     face="Courier New">GX_VA_TEX0</font>.</TD>
31    </tr>
32  <tr>
33<TD width="25%"><font face="Courier New"><em><strong>Data</strong></em></font></TD>
34<TD valign="top" align="left" width="45%">16-bit index, 8-bit index, or direct data.</TD>
35    </tr>
36  <tr>
37      <TD width="30%" rowspan="2">
38<a href="../../../gx/Geometry/GXSetArray.html"><FONT face="Courier New">GXSetArray</FONT></a></TD>
39<TD width="25%"><font face="Courier New"><em><strong>Vertex attribute</strong></em></font></TD>
40<TD valign="top" align="left" width="45%"><font face="Courier New">GX_VA_POS</font>, <font     face="Courier New">GX_VA_NRM</font>, <font face="Courier New">GX_VA_CLR0</font>, <font     face="Courier New">GX_VA_TEX0</font>.</TD>
41    </tr>
42  <tr>
43<TD width="25%"><font face="Courier New"><em><strong>Data</strong></em></font></TD>
44<TD valign="top" align="left" width="45%">Pointer to corresponding array.</TD>
45    </tr>
46  <tr>
47      <TD width="30%" rowspan="2">
48<a href="../../../gx/Geometry/GXGetVtxDesc.html"><FONT face="Courier New">GXSetVtxDesc</FONT></a></TD>
49<TD width="25%"><font face="Courier New"><em><strong>Vertex attribute</strong></em></font></TD>
50<TD valign="top" align="left" width="45%"><font face="Courier New">GX_VA_POS</font>, <font     face="Courier New">GX_VA_NRM</font>, <font face="Courier New">GX_VA_CLR0</font>, <font     face="Courier New">GX_VA_TEX0</font>.</TD>
51    </tr>
52  <tr>
53<TD width="25%"><font face="Courier New"><em><strong>Attribute type to reference</strong></em></font></TD>
54<TD valign="top" align="left" width="45%"><font face="Courier New">GX_INDEX16</font>, <font     face="Courier New">GX_INDEX8</font>, <font face="Courier New">GX_DIRECT</font>.</TD>
55    </tr>
56  <tr>
57<TD width="30%" rowspan="5"><a     href="../../../gx/Geometry/GXSetVtxAttrFmt.html"><FONT face="Courier New">GXSetVtxAttrFmt</FONT></a></TD>
58<TD width="25%"><font face="Courier New"><em><strong>VAT number</strong></em></font></TD>
59<TD valign="top" align="left" width="45%">Always <font face="Courier New">GX_VTXFMT0</font>.</TD>
60    </tr>
61  <tr>
62<TD width="25%"><font face="Courier New"><em><strong>Vertex attribute</strong></em></font></TD>
63<TD valign="top" align="left" width="45%"><font face="Courier New">GX_VA_POS</font>, <font     face="Courier New">GX_VA_NRM</font>, <font face="Courier New">GX_VA_CLR0</font>, <font     face="Courier New">GX_VA_TEX0</font>.</TD>
64    </tr>
65  <tr>
66<TD width="25%"><font face="Courier New"><em><strong>Data type</strong></em></font></TD>
67<TD valign="top" align="left" width="45%"><font face="Courier New">GX_POS_XYZ</font>, <font     face="Courier New">GX_NRM_XYZ</font>, <font face="Courier New">GX_CLR_RGBA</font>, <font     face="Courier New">GX_TEX_ST</font></TD>
68    </tr>
69  <tr>
70<TD width="25%"><font face="Courier New"><em><strong>Attribute component type</strong></em></font></TD>
71<TD valign="top" align="left" width="45%"><font face="Courier New">GX_U8</font>, <font     face="Courier New">GX_S8</font>, <font face="Courier New">GX_U16</font>, <font     face="Courier New">GX_S16</font>, <font face="Courier New">GX_F32</font>, <font     face="Courier New">GX_RGB565</font>, <font face="Courier New">GX_RGB8</font>, <font     face="Courier New">GX_RGBX8</font>, <font face="Courier New">GX_RGBA4</font>, <font     face="Courier New">GX_RGBA6</font>, <font face="Courier New">GX_RGBA8</font></TD>
72    </tr>
73  <tr>
74<TD width="25%"><font face="Courier New"><em><strong>Shift</strong></em></font></TD>
75<TD valign="top" align="left" width="45%">0-16 for position, normal, and texture coordinates.</TD>
76    </tr>
77  <tr>
78<TD width="30%"><a href="../../../gx/Geometry/GXBegin.html"><FONT face="Courier New">GXBegin</FONT></a></TD>
79<TD width="25%"><font face="Courier New"><em><strong>Primitive type</strong></em></font></TD>
80<TD valign="top" align="left" width="45%"><font face="Courier New">GX_POINTS</font>, <font     face="Courier New">GX_LINES</font>, <font face="Courier New">GX_LINESTRIP</font>, <font     face="Courier New">GX_TRIANGLES</font>, <font face="Courier New">GX_TRIANGLESTRIP</font>, <font     face="Courier New">GX_TRIANGLEFAN</font>, <font face="Courier New">GX_QUADS</font></TD>
81    </tr>
82  <tr>
83<TD width="30%" rowspan="4"><a     href="../../../gx/PixelProc/GXSetBlendMode.html"><FONT face="Courier New"><CODE>GXSetBlendMode</CODE></FONT></a></TD>
84<TD width="25%"><font face="Courier New"><em><strong>Types</strong></em></font></TD>
85<TD valign="top" align="left" width="45%"><font face="Courier New"><font face="Courier New">GX_BM_BLEND</font></font></TD>
86    </tr>
87  <tr>
88<TD width="25%"><font face="Courier New"><em><strong>src factor</strong></em></font></TD>
89<TD valign="top" align="left" width="45%"><font face="Courier New"><font face="Courier New">GX_BL_SRCALPHA</font></font></TD>
90    </tr>
91  <tr>
92<TD width="25%"><font face="Courier New"><em><strong>dst factor</strong></em></font></TD>
93<TD valign="top" align="left" width="45%"><font face="Courier New"><font face="Courier New">GX_BL_INVSRCALPHA</font></font></TD>
94    </tr>
95  <tr>
96<TD width="25%"><font face="Courier New"><em><strong>op</strong></em></font></TD>
97<TD valign="top" align="left" width="45%"><font face="Courier New"><font face="Courier New">GX_LO_CLEAR</font></font></TD>
98    </tr>
99</TABLE>
100<h2>Operation Method</h2>
101
102<P>START ends the test.</P>
103<P>X button toggles the control mode.</P>
104<p>&nbsp;&nbsp;&nbsp; <u><strong>Vertex Coordinate Control</strong></u>
105
106<ul>
107<li><SPAN>B button changes the position reference method (Index16, Index8, Direct, None).</SPAN></li>
108</ul>
109
110<p>&nbsp;&nbsp;&nbsp; <u><strong>Color Control</strong></u>
111
112<ul>
113<li><SPAN>B button changes the color reference method (Index16, Index8, Direct, None).</SPAN></li>
114</ul>
115
116<p>&nbsp;&nbsp;&nbsp; <u><strong>Normal Control</strong></u>
117
118<ul>
119<li><SPAN>B button changes the normal reference method (Index16, Index8, Direct, None).</SPAN></li>
120</ul>
121
122<p>&nbsp;&nbsp;&nbsp; <u><strong>Texture Coordinate Control</strong></u>
123
124<ul>
125<li><SPAN>B button changes the texture coordinate reference method (Index16, Index8, Direct, None).</SPAN></li>
126</ul>
127
128<p>&nbsp;&nbsp;&nbsp; <u><strong>Vertex Coordinate Shift Control</strong></u>
129
130<ul>
131<li><SPAN>B button changes the position shift value (0-16).</SPAN></li>
132</ul>
133
134<p>&nbsp;&nbsp;&nbsp; <u><strong>Normal Shift Control</strong></u>
135
136<ul>
137<li><SPAN>B button changes the normal shift value (0-16).</SPAN></li>
138</ul>
139
140<p>&nbsp;&nbsp;&nbsp; <u><strong>Texture Coordinate Shift Control</strong></u>
141
142<ul>
143<li><SPAN>B button changes the texture coordinate shift value (0-16).</SPAN></li>
144</ul>
145
146<h2>Snapshot</h2>
147
148<p>Cubes are drawn using the vertex coordinates, color, normal, and texture. All cubes are 16-bit indexed floating point numbers (color RGB8).</p>
149
150<P><IMG src="./images/geo-vtx-fmt-1.jpg" alt="geo-vtx-fmt-1.jpg" WIDTH="614" HEIGHT="454"></p>
151
152<p>Cubes are drawn using the vertex coordinates, normal, and texture. All cubes are 16-bit indexed floating point numbers.</p>
153
154<P><IMG src="./images/geo-vtx-fmt-2.jpg" alt="geo-vtx-fmt-2.jpg" WIDTH="613" HEIGHT="458"></p>
155
156<p>Cubes are drawn using the vertex coordinates, color, and texture. All cubes are 16-bit indexed floating point numbers (color RGB8).</p>
157
158<P><IMG src="./images/geo-vtx-fmt-3.jpg" alt="geo-vtx-fmt-3.jpg" WIDTH="614" HEIGHT="454"></p>
159
160<p>Cubes are drawn using the vertex coordinates, color, and normal. All cubes are 16-bit indexed floating point numbers (color RGB8).</p>
161
162<P><IMG src="./images/geo-vtx-fmt-4.jpg" alt="geo-vtx-fmt-4.jpg" WIDTH="618" HEIGHT="455"></p>
163
164<h2>Required Data Files</h2>
165
166<p><font face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTextrs.tpl</font></p>
167<H2>Revision History</H2>
168<P>2006/03/01 Initial version.</P>
169<hr>
170<P>CONFIDENTIAL</p>
171</BODY>
172</HTML>