tex-mix-mode

Description

This program tests simultaneous use of preloaded and cached texture. Textured cubes are displayed on the screen. Out of the 16 textures used in this example some are preloaded and others use caches. You can set up to seven preloaded textures up (this program prepares only 8 regions shared for preloading and caching).

Coverage

Functions Parameters Description
GXInitTexObj Pointer to image data. Appropriate value.
Width and height Fixed.
format Always GX_RGB565
Wrap mode (s, t). Always GX_REPEAT
Mipmap Always GX_TRUE
GXInitTexObjUserData User data pointer Existing pointer (to texture region objects).
GXGetTexObjUserData (no parameter)
GXPreLoadEntireTexture Texture region Appropriate GXTexRegion object
GXLoadTexObjPreLoaded Texture region The correct region where the texture data is preloaded.
Destination texture name Always GX_TEXMAP0
GXLoadTexObj Destination texture name Always GX_TEXMAP0
GXInitTexCacheRegion 32-bit mipmap flag. Always GX_FALSE
TMEM address (even, odd). Appropriate lower bank address (even)
Appropriate higher bank address (odd)
Cache size (even, odd). Always GX_TEXCACHE_32K
GXInitTexPreloadRegion TMEM address (even/odd) Appropriate lower bank address (even)
Appropriate higher bank address (odd)
Texture region size (even/odd) Always 32768
GXSetTexRegionCallBack Callback Functions One function
GXInvalidateTexAll (no parameter)
GXTexModeSync (no parameter)
GXSetTevOp TEV stage ID Always GX_TEVSTAGE0
Operation mode Always GX_REPLACE

Using the Demo

START exits the demo.

The L and R Buttons change the number of preloaded textures (0-7).
If the number is n, textures with numbers that are less than n are preloaded.

The X and Y Buttons change the number of layers drawn.
Drawing many layers to check the difference in performance may be useful.

Snapshot

tex-mix-mode-1.gif (107748 bytes)

Data Files Required

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

Revision History

2006/03/01 Initial version.


CONFIDENTIAL