coastline 0.0.4
Loading...
Searching...
No Matches
renderbackend.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SdlRenderBackendState
 The entries of g_pTextureEntries of the textures of precipitation. More...

Macros

#define PRECIPITATION_TEXTURE_COUNT   2
 The number of entries of g_adwPrecipitationTextureIds.
#define g_pfnRenderBackendSubmitDisplayList   (GetSdlRenderBackendState()->submitDisplayList)
 Submit a terminated display list through the active renderer.
#define g_pfnAliasTextureEntrySurface   (GetSdlRenderBackendState()->aliasTexture)
 Alias entry to source; the default SDL hook does nothing.
#define g_pfnCreateTextureFromN64Image   (GetSdlRenderBackendState()->createTexture)
 Create a texture entry from an N64 image and palette, returning its index.
#define g_pfnDecodeN64TextureToPixelBuffer   (GetSdlRenderBackendState()->decodeTexture)
 Decode an N64 image into caller-provided storage and return its decoded byte count.
#define g_pfnRenderBackendInit   (GetSdlRenderBackendState()->initialize)
#define g_pfnInitializeTextureSubsystem   (GetSdlRenderBackendState()->initializeTextures)
#define g_pfnRenderBackendShutdown   (GetSdlRenderBackendState()->shutdown)
#define g_pfnShutdownTextureSubsystem   (GetSdlRenderBackendState()->shutdownTextures)
#define g_pfnRenderBackendUpdateFog   (GetSdlRenderBackendState()->updateFog)
#define g_bForceTextureClone   (GetSdlRenderBackendState()->forceTextureClone)
#define g_bDisableCarShadow   (GetSdlRenderBackendState()->disableCarShadow)
#define g_dwHudOverlayTextureId   (GetSdlRenderBackendState()->hudOverlay)
#define g_dwHudOverlayHalfTextureId   (GetSdlRenderBackendState()->hudOverlayHalf)
#define g_dwParticleTextureId   (GetSdlRenderBackendState()->particles)
#define g_dwTireTrailTextureId   (GetSdlRenderBackendState()->tireTrail)
#define g_dwVehicleEnvMapTextureId   (GetSdlRenderBackendState()->vehicleEnvironment)
#define g_dwFallbackEnvMapTextureId   (GetSdlRenderBackendState()->fallbackEnvironment)
#define g_dwAlphaRampStripRowCount   (GetSdlRenderBackendState()->alphaRampRows)
#define g_adwPrecipitationTextureIds   (GetSdlRenderBackendState()->precipitation)

Functions

void NullStub2 (void *pMemory)
 Do nothing.
void ResetRenderCommandBufferStack (void)
 Link every vertex of g_aShadowClipVertexPool into its free list, in order.
void ClearSplitScreenRenderState (void)
 Clear the tracks of skid marks.
void CreateGlobalEffectTextures (void)
 Load and create the textures every race uses: the overlay and the glyphs of the display of the race, the particles, the trails of the tyres, the maps of the environment, and the ramps of alpha and precipitation.
void ResetModelDataPool (void)
 Empty the pool of the data of the models.
SdlRenderBackendState * GetSdlRenderBackendState (void)

Macro Definition Documentation

◆ PRECIPITATION_TEXTURE_COUNT

#define PRECIPITATION_TEXTURE_COUNT   2

The number of entries of g_adwPrecipitationTextureIds.

◆ g_pfnRenderBackendSubmitDisplayList

#define g_pfnRenderBackendSubmitDisplayList   (GetSdlRenderBackendState()->submitDisplayList)

Submit a terminated display list through the active renderer.

◆ g_pfnAliasTextureEntrySurface

#define g_pfnAliasTextureEntrySurface   (GetSdlRenderBackendState()->aliasTexture)

Alias entry to source; the default SDL hook does nothing.

◆ g_pfnCreateTextureFromN64Image

#define g_pfnCreateTextureFromN64Image   (GetSdlRenderBackendState()->createTexture)

Create a texture entry from an N64 image and palette, returning its index.

Dimensions are in texels; lineBytes, size, and format describe the source RDP tile. Remaining options describe mirroring, clamping, coordinate shifts, and row swapping. The default SDL hook accepts only 8-bit colour-indexed images, returning zero otherwise.

◆ g_pfnDecodeN64TextureToPixelBuffer

#define g_pfnDecodeN64TextureToPixelBuffer   (GetSdlRenderBackendState()->decodeTexture)

Decode an N64 image into caller-provided storage and return its decoded byte count.

Dimensions are in texels; lineBytes, size, and format describe the source RDP tile. The default SDL hook returns zero for formats other than 8-bit colour-indexed images.

◆ g_pfnRenderBackendInit

#define g_pfnRenderBackendInit   (GetSdlRenderBackendState()->initialize)

Initialise the selected render backend.

◆ g_pfnInitializeTextureSubsystem

#define g_pfnInitializeTextureSubsystem   (GetSdlRenderBackendState()->initializeTextures)

Initialise its texture subsystem.

◆ g_pfnRenderBackendShutdown

#define g_pfnRenderBackendShutdown   (GetSdlRenderBackendState()->shutdown)

Release the active render backend.

◆ g_pfnShutdownTextureSubsystem

#define g_pfnShutdownTextureSubsystem   (GetSdlRenderBackendState()->shutdownTextures)

Release its texture subsystem.

◆ g_pfnRenderBackendUpdateFog

#define g_pfnRenderBackendUpdateFog   (GetSdlRenderBackendState()->updateFog)

Apply the current race fog settings to the renderer.

◆ g_bForceTextureClone

#define g_bForceTextureClone   (GetSdlRenderBackendState()->forceTextureClone)

Bypass texture metadata matching when creating a device texture.

◆ g_bDisableCarShadow

#define g_bDisableCarShadow   (GetSdlRenderBackendState()->disableCarShadow)

Suppress car shadow rendering when nonzero.

◆ g_dwHudOverlayTextureId

#define g_dwHudOverlayTextureId   (GetSdlRenderBackendState()->hudOverlay)

The texture entry for the race HUD overlay.

◆ g_dwHudOverlayHalfTextureId

#define g_dwHudOverlayHalfTextureId   (GetSdlRenderBackendState()->hudOverlayHalf)

The half-scale HUD overlay entry, or hudOverlay when shared.

◆ g_dwParticleTextureId

#define g_dwParticleTextureId   (GetSdlRenderBackendState()->particles)

The texture entry for race particle effects.

◆ g_dwTireTrailTextureId

#define g_dwTireTrailTextureId   (GetSdlRenderBackendState()->tireTrail)

The texture entry for tyre trails.

◆ g_dwVehicleEnvMapTextureId

#define g_dwVehicleEnvMapTextureId   (GetSdlRenderBackendState()->vehicleEnvironment)

The night-time vehicle reflection texture entry.

◆ g_dwFallbackEnvMapTextureId

#define g_dwFallbackEnvMapTextureId   (GetSdlRenderBackendState()->fallbackEnvironment)

The daytime vehicle reflection texture entry.

◆ g_dwAlphaRampStripRowCount

#define g_dwAlphaRampStripRowCount   (GetSdlRenderBackendState()->alphaRampRows)

The byte stride between adjacent converted alpha-ramp texels.

◆ g_adwPrecipitationTextureIds

#define g_adwPrecipitationTextureIds   (GetSdlRenderBackendState()->precipitation)

Texture entries for precipitation.

Function Documentation

◆ NullStub2()

void NullStub2 ( void * pMemory)

Do nothing.

Parameters
pMemoryNot read.
Ghidra address:
BRD3D: 0x10075330
Ghidra address:
BRGlide: 0x1006e590

◆ ResetRenderCommandBufferStack()

void ResetRenderCommandBufferStack ( void )

Link every vertex of g_aShadowClipVertexPool into its free list, in order.

Ghidra address:
BRD3D: 0x1000f460
Ghidra address:
BRGlide: 0x1000c9c0

◆ ClearSplitScreenRenderState()

void ClearSplitScreenRenderState ( void )

Clear the tracks of skid marks.

Ghidra address:
BRD3D: 0x1000f620
Ghidra address:
BRGlide: 0x1000cb80

◆ CreateGlobalEffectTextures()

void CreateGlobalEffectTextures ( void )

Load and create the textures every race uses: the overlay and the glyphs of the display of the race, the particles, the trails of the tyres, the maps of the environment, and the ramps of alpha and precipitation.

Ghidra address:
BRD3D: 0x10074dd0
Ghidra address:
BRGlide: 0x1006e030

◆ ResetModelDataPool()

void ResetModelDataPool ( void )

Empty the pool of the data of the models.

Ghidra address:
BRD3D: 0x1002b950
Ghidra address:
BRGlide: 0x100189c0

◆ GetSdlRenderBackendState()

SdlRenderBackendState * GetSdlRenderBackendState ( void )
Returns
Renderer storage for the active SDL texture collection.