tex-wrap

Description

This program tests texture wrap modes. There are nine texture panels, and all combinations (three modes for S, T directions) are displayed at once. The user can change the scale of each texture coordinate and filter mode (near/linear).

Coverage

Functions Parameters Description
GXInitTexObj Pointer to image data. Appropriate value.
Width and height Power of 2 only.
format Always GX_TF_RGB5A3.
Wrap mode (s, t). GX_CLAMP, GX_REPEAT, GX_MIRROR
Mipmap GX_TRUE / GX_FALSE
GXInitTexObjLOD minification filter GX_NEAR, GX_LINEAR, GX_NEAR_MIP_LINGX_LIN_MIP_LIN
Magnification filter GX_NEAR, GX_LINEAR
Minimum LOD Always 0 (depends on tpl file).
Max LOD Existing values (depends on tpl file).
LOD bias Always 0 (depends on tpl file).
Bias clamp Always GX_FALSE.
Edge LOD enable Always GX_FALSE (depends on tpl file).
Anisotropic filter Always GX_ANISO_1.
GXLoadTexObj Destination texture name. Always GX_TEXMAP0.
GXSetTevOp TEV stage ID. Always GX_TEVSTAGE0.
Operation mode Always GX_REPLACE.

Using the Demo

START exits the test.

The Control Stick changes the scale of each s, t texture coordinate.

The A Button changes the texture.

The B Button changes filter mode (Near / Linear).

The X Button resets texture coordinates.

Snapshot

Arrow texture is displayed.

(s coordinate) Left: GX_REPEAT, Center: GX_CLAMP, Right: GX_MIRROR
(T coordinate) Top: GX_REPEAT, Center: GX_CLAMP, Bottom:GX_MIRROR

tex-wrap-0.jpg (47056 bytes)

A test color pattern is displayed with a linear filter applied. The border will be gray only when GX_REPEAT is specified.

tex-wrap-1.jpg (34027 bytes)

Data Files Required

$REVOLUTION_SDK_ROOT/dvddata/gxTests/tex-03.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL