14 float offsetS, offsetT;
23 u32 width, height; // N64 width and height
24 u32 clampWidth, clampHeight; // Size to clamp to
25 u32 realWidth, realHeight; // Actual texture size
26 f32 scaleS, scaleT; // Scale to map to 0.0-1.0
27 f32 shiftScaleS, shiftScaleT; // Scale to shift
30 CachedTexture *lower, *higher;
35 #define TEXTURECACHE_MAX (8 * 1024 * 1024)
36 #define TEXTUREBUFFER_SIZE (512 * 1024)
40 CachedTexture *current[2];
41 CachedTexture *bottom, *top;
47 GLuint glNoiseNames[32];
49 HashMap<CachedTexture> hash;
53 extern TextureCache cache;
55 inline u32 pow2( u32 dim )
59 while (i < dim) i <<= 1;
64 inline u32 powof( u32 dim )
78 CachedTexture *TextureCache_AddTop();
79 void TextureCache_MoveToTop( CachedTexture *newtop );
80 void TextureCache_Remove( CachedTexture *texture );
81 void TextureCache_RemoveBottom();
82 void TextureCache_Init();
83 void TextureCache_Destroy();
84 void TextureCache_Update( u32 t );
85 void TextureCache_ActivateTexture( u32 t, CachedTexture *texture );
86 void TextureCache_ActivateNoise( u32 t );
87 void TextureCache_ActivateDummy( u32 t );
88 bool TextureCache_Verify();