#include <revolution/gx.h>
void GXTexCoord2f32( f32 s, f32 t );
void GXTexCoord2u16( u16 s, u16 t );
void GXTexCoord2s16( s16 s, s16 t );
void GXTexCoord2u8 ( u8 s, u8 t );
void GXTexCoord2s8 ( s8 s, s8 t );
void GXTexCoord1f32( f32 s, f32 t );
void GXTexCoord1u16( u16 s, u16 t );
void GXTexCoord1s16( s16 s, s16 t );
void GXTexCoord1u8 ( u8 s, u8 t );
void GXTexCoord1s8 ( s8 s, s8 t );
void GXTexCoord1x16( u16 index );
void GXTexCoord1x8 ( u8 index );
Will depend on function used.
None.
These functions are used to specify texture coordinate data for a vertex. It can only be called between GXBegin and GXEnd. Function names take the following format:
GXTexCoord[n][t]
The function name parameter n describes the number of arguments to the function can take a value of either 1 or 2. The function name parameter t 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. The type letter indicates signed (s), unsigned (u), floating point (f), and index (x) data types. The subsequent number indicates the data's size in bits. For example, u8 indicates an unsigned 8-bit quantity. For example, GXTexCoord2f32 expects two floating point arguments.
The selected function must correspond to the current vertex descriptor and the vertex attribute format specified in the GXBegin function. The current vertex descriptor is set using the GXSetVtxDesc function. The vertex attribute format is set using GXSetVtxAttrFmt.
The order in which vertex functions must be called is specified by the GXSetVtxDesc function. Each vertex must send attributes (positions, colors, normals, etc.) in the specified order to guarantee proper interpretation by the graphics hardware.
When an attribute is indexed (i.e., its type, set by GXSetVtxDesc, is GX_INDEX8 or GX_INDEX16), the vertex function will specify an index to the data, not the data itself. The location of the array that will be indexed is described using GXSetArray. When an attribute is direct (i.e., its type, set by GXSetVtxDesc, is GX_DIRECT), the vertex function sends the data. No vertex function should be called for an attribute which is disabled (i.e., its type, set by GXSetVtxDesc, is GX_NONE). However, every vertex must at least enable GX_VA_POS.
The GXTexCoord[n][t] functions are implemented as inline functions in the non-debug version of the GX library for optimal performance. These functions are implemented in the debug version of the library so it can verify the correct order of vertex function calls between GXBegin and GXEnd (a common source of errors).
GXBegin
GXEnd
GXSetVtxDesc
GXSetVtxAttrFmt
03/01/2006 Initial version.