The texture memory of the texture mapping units of the Glide renderer, and the textures the game downloads into it.
More...
#include <glide.h>
#include <windows.h>
Go to the source code of this file.
|
| typedef struct GlideTextureSlot | GlideTextureSlot |
| | A texture in the memory of a texture mapping unit.
|
| typedef struct GlideTmuMemory | GlideTmuMemory |
| | The texture memory of a texture mapping unit that the textures have not taken.
|
|
| void | ResetGlideTmuTextureAllocator (void) |
| | Empty the texture memory of every texture mapping unit.
|
| 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.
|
| void | DownloadGlideTextureMipMap (unsigned nSlot, const void *pData, int nUnused) |
| | Download the texels of a texture into the memory of its texture mapping unit.
|
| void | BindGlideTextureSource (unsigned nSlot) |
| | Make a texture the source of its texture mapping unit, with its clamping, filters, level of detail bias, and mipmapping.
|
| void | AppendUniqueGlideErrorMessage (const char *pszMessage) |
| | Append a message and a space to g_szDebugOverlayText, unless the text already has the message.
|
| int | CreateGlideTextureFromRawImage (unsigned char *pPixels, int nWidth, int nHeight, int nFormat) |
| | Create a texture from texels already in a format of Glide.
|
| 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.
|
The texture memory of the texture mapping units of the Glide renderer, and the textures the game downloads into it.
◆ GLIDE_TEXTURE_SLOT_COUNT
| #define GLIDE_TEXTURE_SLOT_COUNT 1024 |
The number of entries of g_aGlideTextureSlots.
◆ GLIDE_TMU_COUNT
| #define GLIDE_TMU_COUNT 2 |
The number of entries of g_aGlideTmuMemory.
◆ GLIDE_TMU_UPPER_REGION_ADDRESS
| #define GLIDE_TMU_UPPER_REGION_ADDRESS 0x200000 |
The address of texture memory where the upper region of a texture mapping unit begins.
◆ GlideTextureSlot
| typedef struct GlideTextureSlot GlideTextureSlot |
A texture in the memory of a texture mapping unit.
◆ GlideTmuMemory
| typedef struct GlideTmuMemory GlideTmuMemory |
The texture memory of a texture mapping unit that the textures have not taken.
◆ ResetGlideTmuTextureAllocator()
| void ResetGlideTmuTextureAllocator |
( |
void | | ) |
|
Empty the texture memory of every texture mapping unit.
- Ghidra address:
- BRGlide: 0x100281c0
◆ AllocateGlideTmuTexture()
| 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.
- Parameters
-
| nTmu | The texture mapping unit. |
| nEvenOdd | The levels of detail present, a GR_MIPMAPLEVELMASK_* value. |
| nWidth | The width of the texture, in texels. |
| nHeight | The height of the texture, in texels. |
| nFormat | The format of the texels, a GrTextureFormat_t. |
| nMipMapMode | The mipmapping mode, a GrMipMapMode_t. |
| nSmallLod | The smallest level of detail, a GrLOD_t. |
| nLargeLod | The largest level of detail, a GrLOD_t. |
| nAspectRatio | The aspect ratio, a GrAspectRatio_t. |
| nClampS | The clamping of s, a GrTextureClampMode_t. |
| nClampT | The clamping of t, a GrTextureClampMode_t. |
| nMinifyFilter | The minification filter, a GrTextureFilterMode_t. |
| nMagnifyFilter | The magnification filter, a GrTextureFilterMode_t. |
| fLodBias | The level of detail bias. |
| nLodBlend | Whether the levels of detail blend, an FxBool. |
- Returns
- The entry of g_aGlideTextureSlots, or -1 when the slots or the memory run out.
- Ghidra address:
- BRGlide: 0x10028200
◆ DownloadGlideTextureMipMap()
| void DownloadGlideTextureMipMap |
( |
unsigned | nSlot, |
|
|
const void * | pData, |
|
|
int | nUnused ) |
Download the texels of a texture into the memory of its texture mapping unit.
- Parameters
-
| nSlot | The entry of g_aGlideTextureSlots. |
| pData | The texels. |
| nUnused | Not read. |
- Ghidra address:
- BRGlide: 0x100283c0
◆ BindGlideTextureSource()
| void BindGlideTextureSource |
( |
unsigned | nSlot | ) |
|
Make a texture the source of its texture mapping unit, with its clamping, filters, level of detail bias, and mipmapping.
- Parameters
-
| nSlot | The entry of g_aGlideTextureSlots. |
- Ghidra address:
- BRGlide: 0x10028420
◆ AppendUniqueGlideErrorMessage()
| void AppendUniqueGlideErrorMessage |
( |
const char * | pszMessage | ) |
|
Append a message and a space to g_szDebugOverlayText, unless the text already has the message.
- Parameters
-
- Ghidra address:
- BRGlide: 0x1006ff50
◆ CreateGlideTextureFromRawImage()
| int CreateGlideTextureFromRawImage |
( |
unsigned char * | pPixels, |
|
|
int | nWidth, |
|
|
int | nHeight, |
|
|
int | nFormat ) |
Create a texture from texels already in a format of Glide.
- Parameters
-
| pPixels | The texels. |
| nWidth | The width, in texels. |
| nHeight | The height, in texels. |
| nFormat | The format of the texels, a GrTextureFormat_t. |
- Returns
- The entry of g_pTextureEntries.
- Ghidra address:
- BRGlide: 0x10027fb0
◆ ConvertRgba32ToArgb1555()
| 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.
- Parameters
-
| pDest | Receives the converted pixels. |
| pSource | The pixels to convert. |
| nBytes | The bytes of the pixels to convert. |
- Returns
- The bytes written.
- Ghidra address:
- BRGlide: 0x10023cb0
◆ g_aGlideTmuMemory
The texture memory of each texture mapping unit not yet taken.
- Ghidra address:
- BRGlide: 0x10661830
◆ g_aGlideTextureSlots
The textures in the memory of the texture mapping units.
- Ghidra address:
- BRGlide: 0x10661840
◆ g_dwGlideTextureSlotCount
| unsigned g_dwGlideTextureSlotCount |
|
extern |
The number of entries of g_aGlideTextureSlots in use.
- Ghidra address:
- BRGlide: 0x105d17ec
◆ g_nBoundTextureTmu
The texture mapping unit the texture combine was set for last, or -1 for none.
- Ghidra address:
- BRGlide: 0x105e1820