#include <revolution/gd.h>
void GDSetTexCached(
GXTexMapID id,
u32 tmem_even, GXTexCacheSize size_even,
u32 tmem_odd, GXTexCacheSize size_odd );
| id | The hardware texture map ID to change. |
|---|---|
| tmem_even | Base pointer in Texture Memory for even LODs (refer to table). Must be a multiple of 2 KB. |
| size_even | Size of the even numbered cache. Acceptable values are: GX_TEXCACHE_32K, GX_TEXCACHE_128K, and GX_TEXCACHE_512K. |
| tmem_odd | Base pointer in Texture Memory for the odd LODs (see table). Must be a multiple of 2 KB. |
| size_odd | Size of the odd numbered cache. Acceptable values are: GX_TEXCACHE_32K, GX_TEXCACHE_128K, GX_TEXCACHE_512K, and GX_TEXCACHE_NONE. |
None.
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 be cached, while GDSetTexPreLoaded sets it to be preloaded. 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 rules governing this, refer to GXInitTexCacheRegion.
GXInitTexCacheRegion, GDSetTexPreLoaded
2006/03/01 Initial version.
CONFIDENTIAL