geo-vtx-fmt

Description

geo-vtx-fmt 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 theGXVertex, GXSetArray, GXSetVtxDesc, and GXSetVtxAttrFmt 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.

Coverage

Functions Parameters Description
GXPosition
GXColor
GXNormal
GXTexCoord
vertex attribute GX_VA_POS, GX_VA_NRM, GX_VA_CLR0, GX_VA_TEX0
data 16-bit index, 8-bit index, or direct data
GXSetArray vertex attribute GX_VA_POS, GX_VA_NRM, GX_VA_CLR0, GX_VA_TEX0
data Pointer to corresponding array.
GXSetVtxDesc vertex attribute GX_VA_POS, GX_VA_NRM, GX_VA_CLR0, GX_VA_TEX0
Attribute type to reference GX_INDEX16, GX_INDEX8, GX_DIRECT.
GXSetVtxAttrFmt VAT number Always GX_VTXFMT0.
vertex attribute GX_VA_POS, GX_VA_NRM, GX_VA_CLR0, GX_VA_TEX0
Data type GX_POS_XYZ, GX_NRM_XYZ, GX_CLR_RGBA, GX_TEX_ST
Attribute component type GX_U8, GX_S8, GX_U16, GX_S16, GX_F32, GX_RGB565, GX_RGB8, GX_RGBX8, GX_RGBA4, GX_RGBA6, GX_RGBA8
Shift 0 through 16 for position, normal, and texture coordinates.
GXBegin Primitive Type GX_POINTS, GX_LINES, GX_LINESTRIP, GX_TRIANGLES, GX_TRIANGLESTRIP, GX_TRIANGLEFAN, GX_QUADS
GXSetBlendMode Types GX_BM_BLEND
src factor GX_BL_SRCALPHA
dst factor GX_BL_INVSRCALPHA
Logic calculations GX_LO_CLEAR

Using the Demo

START ends the test.

X button toggles the control mode.

    Vertex Coordinate Control

    Color Control

    Normal Control

    Texture Coordinate Control

    Vertex Coordinate Shift Control

    Normal Shift Control

    Texture Coordinate Shift Control

Snapshot

Cubes are drawn using the vertex coordinates, color, normal, and texture. All cubes are 16-bit indexed floating point numbers (color is RGB8).

geo-vtx-fmt-1.jpg

Cubes are drawn using the vertex coordinates, normal, and texture. All cubes are 16-bit indexed floating point numbers.

geo-vtx-fmt-2.jpg

Cubes are drawn using the vertex coordinates, color, and texture. All cubes are 16-bit indexed floating point numbers (color is RGB8).

geo-vtx-fmt-3.jpg

Cubes are drawn using the vertex coordinates, color, and normal. All cubes are 16-bit indexed floating point numbers (color is RGB8).

geo-vtx-fmt-4.jpg

Required Data Files

$REVOLUTION_SDK_ROOT/dvddata/gxTextrs.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL