GDSetTexCached

C Specification

#include <revolution/gd.h>
void GDSetTexCached(
GXTexMapID id,
u32 tmem_even, GXTexCacheSize size_even,
u32 tmem_odd,  GXTexCacheSize size_odd );

Arguments

id The hardware texture map ID to change.
tmem_even Base pointer in texture memory for even numbered LOD (refer to this table). Must be a multiple of 2 KB.
size_even Size of the even numbered cache. The following values are accepted: GX_TEXCACHE_32K, GX_TEXCACHE_128K, and GX_TEXCACHE_512K.
tmem_odd Base pointer in texture memory for the odd numbered LOD (refer to this table). Must be a multiple of 2 KB.
size_odd Size of the odd numbered cache. The following values are accepted: GX_TEXCACHE_32K, GX_TEXCACHE_128K, GX_TEXCACHE_512K, and GX_TEXCACHE_NONE.

Return Values

None.

Description

This function is used to set a specified hardware texture map ID as cached texture and bind it to a specified region of texture memory (TMEM). Unlike the GX library, which uses texture objects, GD functions set the hardware registers directly.

A specified texture map can either be cached or preloaded. A cached texture resides in main memory and uses TMEM as a cache. Preloaded textures reside entirely in TMEM. This function sets the texture map to a cached texture while the GDSetTexPreLoaded function sets the texture map to a preloaded texture. In either case, the texture map must be bound to a particular region of TMEM. The cache size must be declared for cached textures.

TMEM is divided into low order and high order banks. The texture may be split between the banks depending upon the texture format. For the management rules, refer to the GXInitTexCacheRegion function.

See Also

GXInitTexCacheRegion

GDSetTexPreLoaded

Revision History

03/01/2006 Initial version.