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>GXTexCoord[n][t]</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXTexCoord</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>void GXTexCoord2f32( f32 s, f32 t );
18void GXTexCoord2u16( u16 s, u16 t );
19void GXTexCoord2s16( s16 s, s16 t );
20void GXTexCoord2u8 ( u8 s, u8 t );
21void GXTexCoord2s8 ( s8 s, s8 t );
22
23void GXTexCoord1f32( f32 s, f32 t );
24void GXTexCoord1u16( u16 s, u16 t );
25void GXTexCoord1s16( s16 s, s16 t );
26void GXTexCoord1u8 ( u8 s, u8 t );
27void GXTexCoord1s8 ( s8 s, s8 t );
28
29void GXTexCoord1x16( u16 index );
30void GXTexCoord1x8 ( u8  index );</CODE></PRE>
31</DL>
32<H2>Arguments</H2>
33<P>Will depend on function used.</P>
34<H2>Return Values</H2>
35<P>None.</P>
36<H2>Description</H2>
37<P>These functions are used to specify texture coordinate data for a vertex.&nbsp;It can only be called between <a href="GXBegin.html"><code>GXBegin</code></a> and <a href="GXEnd.html"><code>GXEnd</code></a>.&nbsp;Function names take the following format:</P>
38<BLOCKQUOTE><CODE>GXTexCoord[n][t]</CODE></BLOCKQUOTE>
39<P> </P>
40<P>The function name parameter <CODE>n</CODE> describes the number of arguments to the function can take a value of either 1 or 2. The function name parameter <code>t</code> describes the type of each argument to the function and can be one of the following values: s8, u8, s16, u16, f32, x8, or x16.&nbsp;The type letter indicates signed (<CODE>s</CODE>), unsigned (<CODE>u</CODE>), floating point (<code>f</code>), and index (<code>x</code>) data types.&nbsp;The subsequent number indicates the data's size in bits. For example, <code>u8</code> indicates an unsigned 8-bit quantity.&nbsp;For example, <code>GXTexCoord2f32</code> expects two floating point arguments.</P>
41<P>The selected function must correspond to the current vertex descriptor and the vertex attribute format specified in the <a href="GXBegin.html"><code>GXBegin</code></a> function.&nbsp;The current vertex descriptor is set using the <a href="GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a> function.&nbsp;The vertex attribute format is set using <a href="GXSetVtxAttrFmt.html"><code>GXSetVtxAttrFmt</code></a>.</P>
42<P>The order in which vertex functions must be called is specified by&nbsp;the <a href="GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a> function.&nbsp;Each vertex must send attributes (positions, colors, normals, etc.) in the specified order to guarantee proper interpretation by the graphics hardware.&nbsp;</P>
43<P>When an attribute is indexed (i.e., its type, set by <a href="GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a>, is <code>GX_INDEX8</code> or <code>GX_INDEX16</code>), the vertex function will specify an index to the data, not the data itself.&nbsp;The location of the array that will be indexed is described using <a href="GXSetArray.html"><code>GXSetArray</code></a>. When an attribute is direct (i.e., its type, set by <a href="GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a>, is <code>GX_DIRECT</code>), the vertex function sends the data.&nbsp;No vertex function should be called for an attribute which is disabled (i.e., its type, set by <a href="GXSetVtxDesc.html"><code>GXSetVtxDesc</code></a>, is <code>GX_NONE</code>).&nbsp;However, every vertex must at least enable <code>GX_VA_POS</code>.</P>
44<P>The <code>GXTexCoord[n][t]</code> functions are implemented as inline functions in the non-debug version of the GX library for optimal performance.&nbsp;These functions are implemented in the debug version of the library so it can verify the correct order of vertex function calls between <CODE><a href="GXBegin.html">GXBegin</a></CODE> and <CODE><a href="GXEnd.html">GXEnd</a></CODE> (a common source of errors).</P>
45<H2>See Also</H2>
46<P><CODE><A href="GXBegin.html">GXBegin</A>&nbsp;&nbsp;<BR> <A href="GXEnd.html">GXEnd</A><BR> <A href="GXSetVtxDesc.html">GXSetVtxDesc</A><BR> <A href="GXSetVtxAttrFmt.html">GXSetVtxAttrFmt</A></CODE></P>
47<H2>Revision History</H2>
48<P>03/01/2006 Initial version.</P>
49</BODY>
50</HTML>