1#ifndef COASTLINE_PLATFORM_WIN_GLIDE_TEXTURECACHE_H
2#define COASTLINE_PLATFORM_WIN_GLIDE_TEXTURECACHE_H
14#define GLIDE_TEXTURE_SLOT_COUNT 1024
17#define GLIDE_TMU_COUNT 2
20#define GLIDE_TMU_UPPER_REGION_ADDRESS 0x200000
116 unsigned char nEvenOdd,
A texture in the memory of a texture mapping unit.
Definition texturecache.h:23
int nAspectRatio
Definition texturecache.h:28
int nUnknown34
Definition texturecache.h:37
int nSmallLod
Definition texturecache.h:39
int nUnknown0
Definition texturecache.h:24
int nMagnifyFilter
Definition texturecache.h:32
int nEvenOdd
Definition texturecache.h:42
int nFormat
Definition texturecache.h:30
int nLodBlend
Definition texturecache.h:44
unsigned char abUnknown54[0x70]
Definition texturecache.h:45
int nTmu
Definition texturecache.h:41
const void * pData
Definition texturecache.h:29
int nMipMapMode
Definition texturecache.h:31
int nUnknown30
Definition texturecache.h:36
int nClampS
Definition texturecache.h:34
int nWidth
Definition texturecache.h:26
int bInUse
Definition texturecache.h:25
int nMinifyFilter
Definition texturecache.h:33
int nLargeLod
Definition texturecache.h:40
int nClampT
Definition texturecache.h:35
int nHeight
Definition texturecache.h:27
GrTexInfo info
Definition texturecache.h:46
unsigned dwLodBias
Definition texturecache.h:38
FxU32 dwStartAddress
Definition texturecache.h:43
The texture memory of a texture mapping unit that the textures have not taken.
Definition texturecache.h:50
FxU32 dwNextAddress
Definition texturecache.h:51
FxU32 dwUpperAddress
Definition texturecache.h:52
int g_nBoundTextureTmu
The texture mapping unit the texture combine was set for last, or -1 for none.
unsigned g_dwGlideTextureSlotCount
The number of entries of g_aGlideTextureSlots in use.
int ConvertRgba32ToArgb1555(unsigned char *pDest, const unsigned char *pSource, int nBytes)
Convert pixels of eight bits a channel to ARGB1555, with the high bit of alpha.
int CreateGlideTextureFromRawImage(unsigned char *pPixels, int nWidth, int nHeight, int nFormat)
Create a texture from texels already in a format of Glide.
#define GLIDE_TMU_COUNT
The number of entries of g_aGlideTmuMemory.
Definition texturecache.h:17
void ResetGlideTmuTextureAllocator(void)
Empty the texture memory of every texture mapping unit.
#define GLIDE_TEXTURE_SLOT_COUNT
The number of entries of g_aGlideTextureSlots.
Definition texturecache.h:14
void AppendUniqueGlideErrorMessage(const char *pszMessage)
Append a message and a space to g_szDebugOverlayText, unless the text already has the message.
void DownloadGlideTextureMipMap(unsigned nSlot, const void *pData, int nUnused)
Download the texels of a texture into the memory of its texture mapping unit.
GlideTextureSlot g_aGlideTextureSlots[GLIDE_TEXTURE_SLOT_COUNT]
The textures in the memory of the texture mapping units.
GlideTmuMemory g_aGlideTmuMemory[GLIDE_TMU_COUNT]
The texture memory of each texture mapping unit not yet taken.
void BindGlideTextureSource(unsigned nSlot)
Make a texture the source of its texture mapping unit, with its clamping, filters,...
int AllocateGlideTmuTexture(int nTmu, unsigned char nEvenOdd, int nWidth, int nHeight, int nFormat, int nMipMapMode, int nSmallLod, int nLargeLod, int nAspectRatio, int nClampS, int nClampT, int nMinifyFilter, int nMagnifyFilter, float fLodBias, int nLodBlend)
Take the texture memory for a texture and record how it is sampled.