MiniQuake

src/miniquake/render/world.ml

Package
miniquake.render.world
Reachable
Yes

Imports

Declarations

active_lightmaps

active_lightmaps

Tracks the module-level active lightmaps state owned by `miniquake.render.world`.

View source

AddLightBlend

function AddLightBlend(red, green, blue, alpha2)

Add state for add light blend.

ParameterTypeDefaultDescription
reddynamic—The red input consumed by `AddLightBlend`.
greendynamic—The green input consumed by `AddLightBlend`.
bluedynamic—The blue input consumed by `AddLightBlend`.
alpha2dynamic—The alpha2 input consumed by `AddLightBlend`.

View source

allocated

allocated

Tracks the module-level allocated state owned by `miniquake.render.world`.

View source

AllocBlock

function AllocBlock(width, height, xOut, yOut)

Create and initialize block.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
xOutdynamic—The x out input consumed by `AllocBlock`.
yOutdynamic—The y out input consumed by `AllocBlock`.

View source

alphaskytexture

alphaskytexture

Tracks the module-level alphaskytexture state owned by `miniquake.render.world`.

View source

blocklights

blocklights

Tracks the module-level blocklights state owned by `miniquake.render.world`.

View source

BoundPoly

function BoundPoly(numverts, vertices, minimums, maximums)

----------------------------------------------------------------------------- gl_warp.c -----------------------------------------------------------------------------

ParameterTypeDefaultDescription
numvertsdynamic—The numverts input consumed by `BoundPoly`.
verticesdynamic—The vertices input consumed by `BoundPoly`.
minimumsdynamic—The minimums input consumed by `BoundPoly`.
maximumsdynamic—The maximums input consumed by `BoundPoly`.

View source

buildLightmap

function buildLightmap(renderer, surface)

Create and initialize lightmap.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `buildLightmap`.

View source

buildStandaloneLightmap

function buildStandaloneLightmap(renderer, surface)

External BSP models such as maps/b_bh25.bsp are independent brush models, not *n submodels of the active world. GLQuake includes all of them in GL_BuildLightmaps. Keep their uploads independent from the world's shared atlas so loading one cannot replace the active world's compatibility state.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `buildStandaloneLightmap`.

View source

buildSurface

function buildSurface(map, faceIndex, underwaterFlags)

Create and initialize surface.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `buildSurface`.
faceIndexdynamic—Zero-based index of the requested entry.
underwaterFlagsdynamic—The underwater flags input consumed by `buildSurface`.

View source

BuildSurfaceDisplayList

function BuildSurfaceDisplayList(surface)

Create and initialize surface display list.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `BuildSurfaceDisplayList`.

View source

buildUnderwaterFlags

function buildUnderwaterFlags(map)

Create and initialize underwater flags.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `buildUnderwaterFlags`.

View source

c_brush_polys

c_brush_polys

Tracks the module-level c brush polys state owned by `miniquake.render.world`.

View source

ceilValue

function ceilValue(value)

Return ceil value derived from the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `ceilValue`.

View source

clearStaticCacheOnCreate

clearStaticCacheOnCreate

Tracks the module-level clear static cache on create state owned by `miniquake.render.world`.

View source

coloredLightmapsRequested

coloredLightmapsRequested

Tracks the module-level colored lightmaps requested state owned by `miniquake.render.world`.

View source

compatAbs

inline function compatAbs(value)

Implements the `compatAbs` operation for `miniquake.render.world` (compat abs).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `compatAbs`.

View source

compatAddLightmapPoly

function compatAddLightmapPoly(page, value)

Implements the `compatAddLightmapPoly` operation for `miniquake.render.world` (compat add lightmap poly).

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `compatAddLightmapPoly`.
valuedynamic—Value consumed by `compatAddLightmapPoly`.

View source

compatAssignLightBlend

function compatAssignLightBlend(updated)

Implements the `compatAssignLightBlend` operation for `miniquake.render.world` (compat assign light blend).

ParameterTypeDefaultDescription
updateddynamic—The updated input consumed by `compatAssignLightBlend`.

View source

compatBrushModelOrigin

function compatBrushModelOrigin(entity)

Return compat brush model origin derived from the active module state.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.

View source

compatClearTextureChain

function compatClearTextureChain(index)

Clear one consumed texture chain without discarding its reusable capacity.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

compatContainsInteger

function compatContainsInteger(values, wanted)

Implements the `compatContainsInteger` operation for `miniquake.render.world` (compat contains integer).

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `compatContainsInteger`.
wanteddynamic—The wanted input consumed by `compatContainsInteger`.

View source

compatCopySurfaceLightmapToAtlas

function compatCopySurfaceLightmapToAtlas(surface, pixels)

Implements the `compatCopySurfaceLightmapToAtlas` operation for `miniquake.render.world` (compat copy surface lightmap to atlas).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatCopySurfaceLightmapToAtlas`.
pixelsdynamic—The pixels input consumed by `compatCopySurfaceLightmapToAtlas`.

View source

compatEmptyPlane

function compatEmptyPlane()

Implements the `compatEmptyPlane` operation for `miniquake.render.world` (compat empty plane).

View source

compatEnhancedBatchKeys

function compatEnhancedBatchKeys(values, count)

Pack the populated prefix of a surface builder into the reusable native-key buffer used by the static geometry batch bridge.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `compatEnhancedBatchKeys`.
countdynamic—Number of entries or units to process.

View source

compatEnsureArraySize

function compatEnsureArraySize(values, count, fillValue)

Return compat ensure array size derived from the active module state.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `compatEnsureArraySize`.
countdynamic—Number of entries or units to process.
fillValuedynamic—The fill value input consumed by `compatEnsureArraySize`.

View source

compatEnsureEnhancedBuilders

function compatEnsureEnhancedBuilders()

Ensure one persistent surface builder per BSP texture for the enhanced additive pass. Reusing these builders avoids per-frame chain allocations.

View source

compatEnsureWorldState

function compatEnsureWorldState()

Return compat ensure world state derived from the active module state.

View source

compatFace

function compatFace(surface)

Implements the `compatFace` operation for `miniquake.render.world` (compat face).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatFace`.

View source

compatFinishLightmapChain

function compatFinishLightmapChain(page)

Implements the `compatFinishLightmapChain` operation for `miniquake.render.world` (compat finish lightmap chain).

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `compatFinishLightmapChain`.

View source

compatFinishTextureChain

function compatFinishTextureChain(index)

Resolve one texture chain in GLQuake head-insertion order. Production keeps a reusable tail-appending builder to avoid allocating/copying an array for every visible world polygon; only the consumed chain is materialized.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

compatFnv1a

function compatFnv1a(data, offset, count)

Implements the `compatFnv1a` operation for `miniquake.render.world` (compat fnv1a).

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset of the requested data.
countdynamic—Number of entries or units to process.

View source

compatFreshLightmapAllocation

function compatFreshLightmapAllocation()

Implements the `compatFreshLightmapAllocation` operation for `miniquake.render.world` (compat fresh lightmap allocation).

View source

compatHashLightmapRows

function compatHashLightmapRows(page, firstRow, rowCount)

Implements the `compatHashLightmapRows` operation for `miniquake.render.world` (compat hash lightmap rows).

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `compatHashLightmapRows`.
firstRowdynamic—The first row input consumed by `compatHashLightmapRows`.
rowCountdynamic—Number of entries or units to process.

View source

compatLightmapFormat

function compatLightmapFormat()

Return the active atlas transfer format without changing compatibility traces for ordinary grayscale BSP light data.

View source

compatMultitextureRecords

function compatMultitextureRecords(surfaces, surfaceCount)

Implements the `compatMultitextureRecords` operation for `miniquake.render.world` (compat multitexture records).

ParameterTypeDefaultDescription
surfacesdynamic—The surfaces input consumed by `compatMultitextureRecords`.
surfaceCountdynamic—Number of entries or units to process.

View source

compatPlane

function compatPlane(surface)

Implements the `compatPlane` operation for `miniquake.render.world` (compat plane).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatPlane`.

View source

compatPlaneDistance

function compatPlaneDistance(plane, point)

Implements the `compatPlaneDistance` operation for `miniquake.render.world` (compat plane distance).

ParameterTypeDefaultDescription
planedynamic—The plane input consumed by `compatPlaneDistance`.
pointdynamic—The point input consumed by `compatPlaneDistance`.

View source

compatPrepareBatchedBrushPoly

function compatPrepareBatchedBrushPoly(surface)

Implements the `compatPrepareBatchedBrushPoly` operation for `miniquake.render.world` (compat prepare batched brush poly).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatPrepareBatchedBrushPoly`.

View source

compatRecursiveWorldNode

function compatRecursiveWorldNode(nodeNumber, nodeCount, surfaceCount, visibleFaceCount, useVisibleMask)

Traverse one visible BSP subtree with frame-stable collection sizes. The public wrapper computes these values once; recursive calls no longer repeat array-length and visible-mask identity checks at every node and surface.

ParameterTypeDefaultDescription
nodeNumberdynamic—The node number input consumed by `compatRecursiveWorldNode`.
nodeCountdynamic—Number of entries or units to process.
surfaceCountdynamic—Number of entries or units to process.
visibleFaceCountdynamic—Number of entries or units to process.
useVisibleMaskdynamic—The use visible mask input consumed by `compatRecursiveWorldNode`.

View source

compatRenderDynamicLightmaps

function compatRenderDynamicLightmaps(surface, addToChain)

Implements the `compatRenderDynamicLightmaps` operation for `miniquake.render.world` (compat render dynamic lightmaps).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatRenderDynamicLightmaps`.
addToChaindynamic—The add to chain input consumed by `compatRenderDynamicLightmaps`.

View source

compatResetLightmapRectangle

function compatResetLightmapRectangle(page)

Reset a dirty rectangle in place. Animated lightstyles hit this path often, so retaining the four-slot record avoids one heap object per atlas upload.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `compatResetLightmapRectangle`.

View source

compatSurface

function compatSurface(surface)

Implements the `compatSurface` operation for `miniquake.render.world` (compat surface).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatSurface`.

View source

compatSurfaceBatchKeys

function compatSurfaceBatchKeys(surfaces)

Implements the `compatSurfaceBatchKeys` operation for `miniquake.render.world` (compat surface batch keys).

ParameterTypeDefaultDescription
surfacesdynamic—The surfaces input consumed by `compatSurfaceBatchKeys`.

View source

compatSurfaceIndex

function compatSurfaceIndex(surface)

Return compat surface index derived from the active module state.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatSurfaceIndex`.

View source

compatTexInfo

function compatTexInfo(surface)

Implements the `compatTexInfo` operation for `miniquake.render.world` (compat tex info).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `compatTexInfo`.

View source

compatUploadLightmapSubImage

function compatUploadLightmapSubImage(page, rectangle)

Transfer one dirty atlas rectangle using the format selected at map load.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `compatUploadLightmapSubImage`.
rectangledynamic—The rectangle input consumed by `compatUploadLightmapSubImage`.

View source

compatZeroVector

function compatZeroVector()

Return compat zero vector derived from the active module state.

View source

countVisibleFaces

function countVisibleFaces(visibleFaces)

Report whether count visible faces holds for the active state.

ParameterTypeDefaultDescription
visibleFacesdynamic—The visible faces input consumed by `countVisibleFaces`.

View source

create

function create(map, palette)

Implements the `create` operation for `miniquake.render.world` (create).

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `create`.
palettedynamic—The palette input consumed by `create`.

View source

createExternal

function createExternal(map, palette)

Create and initialize external.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `createExternal`.
palettedynamic—The palette input consumed by `createExternal`.

View source

currentTextureFrame

currentTextureFrame

Tracks the module-level current texture frame state owned by `miniquake.render.world`.

View source

d_lightstylevalue

d_lightstylevalue

Tracks the module-level d lightstylevalue state owned by `miniquake.render.world`.

View source

destroy

function destroy(renderer)

Implements the `destroy` operation for `miniquake.render.world` (destroy).

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

destroyStandaloneBrush

function destroyStandaloneBrush(renderer)

Release resources owned by standalone brush.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

drawBaseSurface

function drawBaseSurface(renderer, surface)

Render base surface.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `drawBaseSurface`.

View source

DrawGLPoly

function DrawGLPoly(poly)

Render glpoly.

ParameterTypeDefaultDescription
polydynamic—The poly input consumed by `DrawGLPoly`.

View source

DrawGLWaterPoly

function DrawGLWaterPoly(poly)

Render glwater poly.

ParameterTypeDefaultDescription
polydynamic—The poly input consumed by `DrawGLWaterPoly`.

View source

DrawGLWaterPolyLightmap

function DrawGLWaterPolyLightmap(poly)

Render glwater poly lightmap.

ParameterTypeDefaultDescription
polydynamic—The poly input consumed by `DrawGLWaterPolyLightmap`.

View source

drawLightSurface

function drawLightSurface(surface)

Render light surface.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `drawLightSurface`.

View source

drawStandaloneBase

function drawStandaloneBase(renderer, surface, currentTime, alternate)

Render standalone base.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `drawStandaloneBase`.
currentTimedynamic—Time value used by the operation.
alternatedynamic—The alternate input consumed by `drawStandaloneBase`.

View source

drawStandaloneBrush

function drawStandaloneBrush(renderer, entity, viewOrigin, currentTime)

Render standalone brush.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
entitydynamic—Entity affected by the operation.
viewOrigindynamic—The view origin input consumed by `drawStandaloneBrush`.
currentTimedynamic—Time value used by the operation.

View source

drawStandaloneBrushEnhanced

function drawStandaloneBrushEnhanced(renderer, entity, viewOrigin, currentTime)

Draw only the base polygons of an external BSP entity for the additive per-pixel light pass. The caller owns blend/depth/shader state.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
entitydynamic—Entity affected by the operation.
viewOrigindynamic—The view origin input consumed by `drawStandaloneBrushEnhanced`.
currentTimedynamic—Time value used by the operation.

View source

drawStandaloneBrushShadow

function drawStandaloneBrushShadow(renderer, entity, floorWorldZ, offsetX, offsetY, contactOnly, pointLightActive, lightX, lightY, lightZ)

Ray-project every polygon of an external BSP object onto the first visible main-world receiver. The legacy floor/contact parameters remain in the ABI; receiver selection now comes exclusively from the configured BSP ray caster.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
entitydynamic—Entity affected by the operation.
floorWorldZdynamic—The floor world z input consumed by `drawStandaloneBrushShadow`.
offsetXdynamic—The offset x input consumed by `drawStandaloneBrushShadow`.
offsetYdynamic—The offset y input consumed by `drawStandaloneBrushShadow`.
contactOnlydynamic—The contact only input consumed by `drawStandaloneBrushShadow`.
pointLightActivedynamic—The point light active input consumed by `drawStandaloneBrushShadow`.
lightXdynamic—The light x input consumed by `drawStandaloneBrushShadow`.
lightYdynamic—The light y input consumed by `drawStandaloneBrushShadow`.
lightZdynamic—The light z input consumed by `drawStandaloneBrushShadow`.

View source

drawStandaloneLight

function drawStandaloneLight(surface)

Render standalone light.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `drawStandaloneLight`.

View source

DrawTextureChains

function DrawTextureChains()

Render texture chains.

View source

EmitBothSkyLayers

function EmitBothSkyLayers(surface)

Add both sky layers to the destination state.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `EmitBothSkyLayers`.

View source

EmitSkyPolys

function EmitSkyPolys(surface)

Add sky polys to the destination state.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `EmitSkyPolys`.

View source

EmitWaterPolys

function EmitWaterPolys(surface)

Add water polys to the destination state.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `EmitWaterPolys`.

View source

faceVertex

function faceVertex(map, face, edgeNumber)

Implements the `faceVertex` operation for `miniquake.render.world` (face vertex).

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `faceVertex`.
facedynamic—The face input consumed by `faceVertex`.
edgeNumberdynamic—The edge number input consumed by `faceVertex`.

View source

floorValue

function floorValue(value)

Implements the `floorValue` operation for `miniquake.render.world` (floor value).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `floorValue`.

View source

GL_BuildLightmaps

function GL_BuildLightmaps()

Mirror Quake's GL_BuildLightmaps routine and its observable state changes.

View source

GL_CreateSurfaceLightmap

function GL_CreateSurfaceLightmap(surface)

Mirror Quake's GL_CreateSurfaceLightmap routine and its observable state changes.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `GL_CreateSurfaceLightmap`.

View source

GL_DisableMultitexture

function GL_DisableMultitexture()

Mirror Quake's GL_DisableMultitexture routine and its observable state changes.

View source

GL_EnableMultitexture

function GL_EnableMultitexture()

Mirror Quake's GL_EnableMultitexture routine and its observable state changes.

View source

GL_SubdivideSurface

function GL_SubdivideSurface(surface)

Mirror Quake's GL_SubdivideSurface routine and its observable state changes.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `GL_SubdivideSurface`.

View source

GLQUAKE_BACKFACE_EPSILON

const GLQUAKE_BACKFACE_EPSILON = 1.e-002

Defines the glquake backface epsilon value used by `miniquake.render.world`.

View source

GLQUAKE_BLOCK_HEIGHT

const GLQUAKE_BLOCK_HEIGHT = 128

Defines the glquake block height value used by `miniquake.render.world`.

View source

GLQUAKE_BLOCK_WIDTH

const GLQUAKE_BLOCK_WIDTH = 128

============================================================================= Canonical MiniQuake 1.09 renderer surface/light/warp entry points.

The C renderer stores the active world, view vectors, light styles and

dynamic lights in translation-unit globals. MiniLang keeps the same state

explicitly in package globals and refreshes it from Host_Frame through

R_ConfigureWorldCompatibility. Lightmaps retain MiniQuake's 128x128 atlas,

allocation and dirty-rectangle semantics; surface-local arrays below replace

only C pointer fields, not observable allocation or upload behavior.

=============================================================================

View source

GLQUAKE_MAX_LIGHTMAPS

const GLQUAKE_MAX_LIGHTMAPS = 64

Defines the glquake max lightmaps value used by `miniquake.render.world`.

View source

GLQUAKE_PLANE_ANYZ

const GLQUAKE_PLANE_ANYZ = 5

Defines the glquake plane anyz value used by `miniquake.render.world`.

View source

GLQUAKE_SURF_UNDERWATER

const GLQUAKE_SURF_UNDERWATER = 128

Defines the glquake surf underwater value used by `miniquake.render.world`.

View source

GLQUAKE_TURBSCALE

const GLQUAKE_TURBSCALE = 40.7436654315252

Defines the glquake turbscale value used by `miniquake.render.world`.

View source

indexedToRgba

function indexedToRgba(indexed, palette, transparent)

Implements the `indexedToRgba` operation for `miniquake.render.world` (indexed to rgba).

ParameterTypeDefaultDescription
indexeddynamic—The indexed input consumed by `indexedToRgba`.
palettedynamic—The palette input consumed by `indexedToRgba`.
transparentdynamic—The transparent input consumed by `indexedToRgba`.

View source

lightmap_bytes

lightmap_bytes

Tracks the module-level lightmap bytes state owned by `miniquake.render.world`.

View source

lightmap_modified

lightmap_modified

Tracks the module-level lightmap modified state owned by `miniquake.render.world`.

View source

lightmap_polys

lightmap_polys

Tracks the module-level lightmap polys state owned by `miniquake.render.world`.

View source

lightmap_rectchange

lightmap_rectchange

Tracks the module-level lightmap rectchange state owned by `miniquake.render.world`.

View source

lightmap_textures

lightmap_textures

Tracks the module-level lightmap textures state owned by `miniquake.render.world`.

View source

lightmaps

lightmaps

Tracks the module-level lightmaps state owned by `miniquake.render.world`.

View source

lightplane

lightplane

Tracks the module-level lightplane state owned by `miniquake.render.world`.

View source

lightspot

lightspot

Tracks the module-level lightspot state owned by `miniquake.render.world`.

View source

markAllVisible

function markAllVisible(renderer)

Report whether mark all visible holds for the active state.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

markVisible

function markVisible(renderer, viewOrigin)

Report whether mark visible holds for the active state.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
viewOrigindynamic—The view origin input consumed by `markVisible`.

View source

markVisibleNodeSubtree

function markVisibleNodeSubtree(map, visibility, currentLeaf, rowBytes, visibleNodes, nodeNumber)

Mark the exact node path to each PVS-visible leaf. GLQuake propagates node->visframe from visible leaves rather than from faces: a leaf with no marksurfaces may still contain efrags/static entities and must keep every ancestor visible. The temporary value two guards malformed cyclic data.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `markVisibleNodeSubtree`.
visibilitydynamic—The visibility input consumed by `markVisibleNodeSubtree`.
currentLeafdynamic—The current leaf input consumed by `markVisibleNodeSubtree`.
rowBytesdynamic—Byte data consumed by the operation.
visibleNodesdynamic—The visible nodes input consumed by `markVisibleNodeSubtree`.
nodeNumberdynamic—The node number input consumed by `markVisibleNodeSubtree`.

View source

mirror

mirror

Tracks the module-level mirror state owned by `miniquake.render.world`.

View source

mirror_plane

mirror_plane

Tracks the module-level mirror plane state owned by `miniquake.render.world`.

View source

missingTexturePixels

function missingTexturePixels()

Implements the `missingTexturePixels` operation for `miniquake.render.world` (missing texture pixels).

View source

mtexenabled

mtexenabled

Tracks the module-level mtexenabled state owned by `miniquake.render.world`.

View source

nColinElim

nColinElim

Tracks the module-level n colin elim state owned by `miniquake.render.world`.

View source

precacheStaticGeometry

function precacheStaticGeometry(renderer)

Preload and register the static geometry asset.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

R_ActiveDynamicLights

function R_ActiveDynamicLights()

Apply the Quake-compatible r active dynamic lights behavior.

View source

R_AddDynamicLights

function R_AddDynamicLights(surface)

Apply the Quake-compatible r add dynamic lights behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_AddDynamicLights`.

View source

R_AdvanceFrameCounters

function R_AdvanceFrameCounters()

Internal package-state adapters used by gl_rmain.c/gl_rmisc.c compatibility.

View source

R_AnimateLight

function R_AnimateLight()

----------------------------------------------------------------------------- gl_rlight.c -----------------------------------------------------------------------------

View source

R_BeginWorldFrame

function R_BeginWorldFrame()

Apply the Quake-compatible r begin world frame behavior.

View source

R_BlendLightmaps

function R_BlendLightmaps()

Apply the Quake-compatible r blend lightmaps behavior.

View source

R_BrushSurfaceFacesViewer

function R_BrushSurfaceFacesViewer(surface, planeDistance)

Brush models use BACKFACE_EPSILON and the opposite-facing test from R_DrawBrushModel.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_BrushSurfaceFacesViewer`.
planeDistancedynamic—The plane distance input consumed by `R_BrushSurfaceFacesViewer`.

View source

R_BuildLightMap

function R_BuildLightMap(surface, destination, stride)

Apply the Quake-compatible r build light map behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_BuildLightMap`.
destinationdynamic—Destination value or collection to update.
stridedynamic—The stride input consumed by `R_BuildLightMap`.

View source

R_ChainSurface

function R_ChainSurface(surface)

Apply the Quake-compatible r chain surface behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_ChainSurface`.

View source

R_ClearLightmapChains

function R_ClearLightmapChains()

Apply the Quake-compatible r clear lightmap chains behavior.

View source

R_ClearProduction

function R_ClearProduction()

Apply the Quake-compatible r clear production behavior.

View source

R_CollectLightmapTextureIds

function R_CollectLightmapTextureIds(renderer)

Apply the Quake-compatible r collect lightmap texture ids behavior.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

R_ConfigureColoredLightmaps

function R_ConfigureColoredLightmaps(enabled)

Select whether optional QLIT sidecars may replace the scalar lightmap samples when the next world atlas is built. The Classic renderer calls this with false, preserving byte-for-byte GLQuake lightmap behavior.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

R_ConfigureEnhancedLighting

function R_ConfigureEnhancedLighting(requestedEnabled, requestedShadows, shadowQuality)

Configure the optional renderer extension. This never mutates Quake world state: an unavailable backend simply leaves the exact Classic path active.

ParameterTypeDefaultDescription
requestedEnableddynamic—The requested enabled input consumed by `R_ConfigureEnhancedLighting`.
requestedShadowsdynamic—The requested shadows input consumed by `R_ConfigureEnhancedLighting`.
shadowQualitydynamic—The shadow quality input consumed by `R_ConfigureEnhancedLighting`.

View source

R_ConfigureSpecialCompatibility

function R_ConfigureSpecialCompatibility(mirrorAlpha, clearColor, zTrick, finishBeforeRender, noRefresh)

Configure MiniQuake's frame-clear and special-render cvars without changing the public renderViewport signature used by older compatibility fixtures.

ParameterTypeDefaultDescription
mirrorAlphadynamic—The mirror alpha input consumed by `R_ConfigureSpecialCompatibility`.
clearColordynamic—The clear color input consumed by `R_ConfigureSpecialCompatibility`.
zTrickdynamic—The z trick input consumed by `R_ConfigureSpecialCompatibility`.
finishBeforeRenderdynamic—The finish before render input consumed by `R_ConfigureSpecialCompatibility`.
noRefreshdynamic—The no refresh input consumed by `R_ConfigureSpecialCompatibility`.

View source

R_ConfigureWorldCompatibility

function R_ConfigureWorldCompatibility(renderer, viewOrigin, viewAngles, viewForward, viewRight, viewUp, dynamicLights, lightStyles, blend, currentTime, realtime, frameTime, flashBlend, dynamicEnabled, noVis)

Apply the Quake-compatible r configure world compatibility behavior.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
viewOrigindynamic—The view origin input consumed by `R_ConfigureWorldCompatibility`.
viewAnglesdynamic—The view angles input consumed by `R_ConfigureWorldCompatibility`.
viewForwarddynamic—The view forward input consumed by `R_ConfigureWorldCompatibility`.
viewRightdynamic—The view right input consumed by `R_ConfigureWorldCompatibility`.
viewUpdynamic—The view up input consumed by `R_ConfigureWorldCompatibility`.
dynamicLightsdynamic—The dynamic lights input consumed by `R_ConfigureWorldCompatibility`.
lightStylesdynamic—The light styles input consumed by `R_ConfigureWorldCompatibility`.
blenddynamic—The blend input consumed by `R_ConfigureWorldCompatibility`.
currentTimedynamic—Time value used by the operation.
realtimedynamic—Time value used by the operation.
frameTimedynamic—Time value used by the operation.
flashBlenddynamic—The flash blend input consumed by `R_ConfigureWorldCompatibility`.
dynamicEnableddynamic—The dynamic enabled input consumed by `R_ConfigureWorldCompatibility`.
noVisdynamic—The no vis input consumed by `R_ConfigureWorldCompatibility`.

View source

R_CurrentDepthFunction

function R_CurrentDepthFunction()

Return the depth comparison selected by R_ClearProduction for this frame. gl_ztrick reverses the depth range every other frame and therefore requires every later overlay (lighting, shadows and the view model) to retain GEQUAL on those frames instead of silently restoring the usual LEQUAL mode.

View source

R_CurrentDepthMaximum

function R_CurrentDepthMaximum()

Mirror Quake's R_CurrentDepthMaximum routine and its observable state changes.

View source

R_CurrentDepthMinimum

function R_CurrentDepthMinimum()

Mirror Quake's R_CurrentDepthMinimum routine and its observable state changes.

View source

R_CurrentDepthRange

function R_CurrentDepthRange()

Apply the Quake-compatible r current depth range behavior.

View source

R_CurrentViewOrigin

function R_CurrentViewOrigin()

Apply the Quake-compatible r current view origin behavior.

View source

R_CurrentWorldMap

function R_CurrentWorldMap()

Return the active main BSP map used by entity shadow-ray projection.

View source

R_CurrentWorldSurfaces

function R_CurrentWorldSurfaces()

Return the active render-surface graph used by arbitrary BSP shadow rays.

View source

r_dlightframecount

r_dlightframecount

Tracks the module-level r dlightframecount state owned by `miniquake.render.world`.

View source

R_DrawBrushModel

function R_DrawBrushModel(entity)

Apply the Quake-compatible r draw brush model behavior.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.

View source

R_DrawBrushModelEnhancedForSubmodel

function R_DrawBrushModelEnhancedForSubmodel(entity, submodelIndex)

Draw only the textured faces of one inline BSP model for the enhanced additive pass; classic lightmap chains and dynamic-light marks are not touched by this second draw.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.
submodelIndexdynamic—Zero-based index of the requested entry.

View source

R_DrawBrushModelForSubmodel

function R_DrawBrushModelForSubmodel(entity, submodelIndex)

Apply the Quake-compatible r draw brush model for submodel behavior.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.
submodelIndexdynamic—Zero-based index of the requested entry.

View source

R_DrawBrushModelShadowForSubmodel

function R_DrawBrushModelShadowForSubmodel(entity, submodelIndex, floorWorldZ, offsetX, offsetY, contactOnly, pointLightActive, lightX, lightY, lightZ)

Ray-project an inline BSP object's complete silhouette onto arbitrary world polygons. Each fan triangle is emitted only when all three rays reach a compatible receiver, preventing interpolation through a BSP corner.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.
submodelIndexdynamic—Zero-based index of the requested entry.
floorWorldZdynamic—The floor world z input consumed by `R_DrawBrushModelShadowForSubmodel`.
offsetXdynamic—The offset x input consumed by `R_DrawBrushModelShadowForSubmodel`.
offsetYdynamic—The offset y input consumed by `R_DrawBrushModelShadowForSubmodel`.
contactOnlydynamic—The contact only input consumed by `R_DrawBrushModelShadowForSubmodel`.
pointLightActivedynamic—The point light active input consumed by `R_DrawBrushModelShadowForSubmodel`.
lightXdynamic—The light x input consumed by `R_DrawBrushModelShadowForSubmodel`.
lightYdynamic—The light y input consumed by `R_DrawBrushModelShadowForSubmodel`.
lightZdynamic—The light z input consumed by `R_DrawBrushModelShadowForSubmodel`.

View source

R_DrawEnhancedWorldLighting

function R_DrawEnhancedWorldLighting()

Render an additive, per-pixel dynamic-light layer over the already complete classic base/lightmap world. Static lightmaps remain untouched; therefore disabling this pass produces byte-for-byte Classic draw ordering again.

View source

R_DrawMirrorOverlay

function R_DrawMirrorOverlay(width, height, viewRect, origin, angles)

Apply the Quake-compatible r draw mirror overlay behavior.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
viewRectdynamic—The view rect input consumed by `R_DrawMirrorOverlay`.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

R_DrawMultitextureBatch

function R_DrawMultitextureBatch(surfaces, surfaceCount)

Apply the Quake-compatible r draw multitexture batch behavior.

ParameterTypeDefaultDescription
surfacesdynamic—The surfaces input consumed by `R_DrawMultitextureBatch`.
surfaceCountdynamic—Number of entries or units to process.

View source

R_DrawSequentialPoly

function R_DrawSequentialPoly(surface)

Apply the Quake-compatible r draw sequential poly behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_DrawSequentialPoly`.

View source

R_DrawSkyChain

function R_DrawSkyChain(chain)

Apply the Quake-compatible r draw sky chain behavior.

ParameterTypeDefaultDescription
chaindynamic—The chain input consumed by `R_DrawSkyChain`.

View source

R_DrawWaterSurfaces

function R_DrawWaterSurfaces()

Apply the Quake-compatible r draw water surfaces behavior.

View source

R_DrawWorld

function R_DrawWorld()

Apply the Quake-compatible r draw world behavior.

View source

R_DynamicLightIsActive

inline function R_DynamicLightIsActive(light, currentTime)

Apply the Quake-compatible r dynamic light is active behavior.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `R_DynamicLightIsActive`.
currentTimedynamic—Time value used by the operation.

View source

r_framecount

r_framecount

Tracks the module-level r framecount state owned by `miniquake.render.world`.

View source

R_GetAllocationCompatibilityState

function R_GetAllocationCompatibilityState(page)

Apply the Quake-compatible r get allocation compatibility state behavior.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `R_GetAllocationCompatibilityState`.

View source

R_GetBlocklights

function R_GetBlocklights()

Apply the Quake-compatible r get blocklights behavior.

View source

R_GetDynamicLightCompatibilityState

function R_GetDynamicLightCompatibilityState(index)

Apply the Quake-compatible r get dynamic light compatibility state behavior.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

R_GetFrameCompatibility

function R_GetFrameCompatibility()

Apply the Quake-compatible r get frame compatibility behavior.

View source

R_GetLightmapBytes

function R_GetLightmapBytes()

Apply the Quake-compatible r get lightmap bytes behavior.

View source

R_GetLightmapCompatibilityState

function R_GetLightmapCompatibilityState(page)

Apply the Quake-compatible r get lightmap compatibility state behavior.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `R_GetLightmapCompatibilityState`.

View source

R_GetMirrorCompatibilityState

function R_GetMirrorCompatibilityState()

Apply the Quake-compatible r get mirror compatibility state behavior.

View source

R_GetSurfaceCompatibilityState

function R_GetSurfaceCompatibilityState(index)

Apply the Quake-compatible r get surface compatibility state behavior.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

R_GetTextureChains

function R_GetTextureChains()

Apply the Quake-compatible r get texture chains behavior.

View source

R_InitSky

function R_InitSky(texture)

Apply the Quake-compatible r init sky behavior.

ParameterTypeDefaultDescription
texturedynamic—Texture resource processed by the operation.

View source

R_LightmapRequiredBytes

function R_LightmapRequiredBytes(width, height, stride, bytesPerSample)

Apply the Quake-compatible r lightmap required bytes behavior.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
stridedynamic—The stride input consumed by `R_LightmapRequiredBytes`.
bytesPerSampledynamic—The bytes per sample input consumed by `R_LightmapRequiredBytes`.

View source

R_LightPoint

function R_LightPoint(point)

Apply the Quake-compatible r light point behavior.

ParameterTypeDefaultDescription
pointdynamic—The point input consumed by `R_LightPoint`.

View source

R_LightPointHit

function R_LightPointHit()

Report whether the most recent vertical light/receiver trace actually hit a world surface. lightspot intentionally retains its storage object for allocation-free alias lighting, so callers must not infer validity merely from that object's non-void state.

View source

R_MainRenderStageOrder

function R_MainRenderStageOrder()

Apply the Quake-compatible r main render stage order behavior.

View source

R_MarkBrushModelLights

function R_MarkBrushModelLights(entity)

Apply the Quake-compatible r mark brush model lights behavior.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.

View source

R_MarkBrushModelLightsForSubmodel

function R_MarkBrushModelLightsForSubmodel(entity, submodelIndex)

Apply the Quake-compatible r mark brush model lights for submodel behavior.

ParameterTypeDefaultDescription
entitydynamic—Entity affected by the operation.
submodelIndexdynamic—Zero-based index of the requested entry.

View source

R_MarkLeaves

function R_MarkLeaves()

Apply the Quake-compatible r mark leaves behavior.

View source

R_MarkLights

function R_MarkLights(light, bit, nodeNumber)

Apply the Quake-compatible r mark lights behavior.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `R_MarkLights`.
bitdynamic—The bit input consumed by `R_MarkLights`.
nodeNumberdynamic—The node number input consumed by `R_MarkLights`.

View source

R_MirrorChain

function R_MirrorChain(surface)

Apply the Quake-compatible r mirror chain behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_MirrorChain`.

View source

R_MirrorChainCount

function R_MirrorChainCount()

Apply the Quake-compatible r mirror chain count behavior.

View source

R_MirrorProjectionScale

function R_MirrorProjectionScale()

Apply the Quake-compatible r mirror projection scale behavior.

View source

R_MirrorReady

inline function R_MirrorReady()

Apply the Quake-compatible r mirror ready behavior.

View source

R_MirrorView

function R_MirrorView(origin, angles)

Apply the Quake-compatible r mirror view behavior.

ParameterTypeDefaultDescription
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

R_PolyBlendProduction

function R_PolyBlendProduction(blend, enabled)

Production MiniQuake R_PolyBlend. Host invokes this after entities, viewmodel and particles, while the 3-D viewport/projection from R_SetupGL is still active and before gl_screen switches to its full-screen 2-D projection. Drawing this as a 2-D quad would incorrectly tint the HUD and console outside r_refdef.vrect.

ParameterTypeDefaultDescription
blenddynamic—The blend input consumed by `R_PolyBlendProduction`.
enableddynamic—Whether the optional behavior is enabled.

View source

R_PushDlights

function R_PushDlights()

Apply the Quake-compatible r push dlights behavior.

View source

R_RecursiveWorldNode

function R_RecursiveWorldNode(nodeNumber)

Apply the Quake-compatible r recursive world node behavior.

ParameterTypeDefaultDescription
nodeNumberdynamic—The node number input consumed by `R_RecursiveWorldNode`.

View source

R_RenderBrushPoly

function R_RenderBrushPoly(surface)

Apply the Quake-compatible r render brush poly behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_RenderBrushPoly`.

View source

R_RenderDlight

function R_RenderDlight(light)

Apply the Quake-compatible r render dlight behavior.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `R_RenderDlight`.

View source

R_RenderDlights

function R_RenderDlights()

Apply the Quake-compatible r render dlights behavior.

View source

R_RenderDynamicLightmaps

function R_RenderDynamicLightmaps(surface)

Apply the Quake-compatible r render dynamic lightmaps behavior.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_RenderDynamicLightmaps`.

View source

R_ResetLightmapCompatibility

function R_ResetLightmapCompatibility()

Apply the Quake-compatible r reset lightmap compatibility behavior.

View source

R_ResetLightStyles

function R_ResetLightStyles(value)

Apply the Quake-compatible r reset light styles behavior.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `R_ResetLightStyles`.

View source

R_ResetMirrorCompatibility

function R_ResetMirrorCompatibility()

Apply the Quake-compatible r reset mirror compatibility behavior.

View source

R_ResetTextureChains

function R_ResetTextureChains()

gl_rsurf.c stores one linked surface chain on every texture. Arrays preserve the same head-insertion order without exposing C pointers.

View source

R_ResetWorldCompatibility

function R_ResetWorldCompatibility()

Apply the Quake-compatible r reset world compatibility behavior.

View source

R_SetAbstractSurfaceCalls

function R_SetAbstractSurfaceCalls(enabled)

Apply the Quake-compatible r set abstract surface calls behavior.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

R_SetCullCompatibility

function R_SetCullCompatibility(enabled)

Apply the Quake-compatible r set cull compatibility behavior.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

R_SetFrameCompatibility

function R_SetFrameCompatibility(frame, visFrame)

Apply the Quake-compatible r set frame compatibility behavior.

ParameterTypeDefaultDescription
framedynamic—The frame input consumed by `R_SetFrameCompatibility`.
visFramedynamic—The vis frame input consumed by `R_SetFrameCompatibility`.

View source

R_SetLightmapChainCompatibility

function R_SetLightmapChainCompatibility(page, surfaces)

Apply the Quake-compatible r set lightmap chain compatibility behavior.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `R_SetLightmapChainCompatibility`.
surfacesdynamic—The surfaces input consumed by `R_SetLightmapChainCompatibility`.

View source

R_SetLightmapCompatibility

function R_SetLightmapCompatibility(textureBase, bytesPerSample)

Apply the Quake-compatible r set lightmap compatibility behavior.

ParameterTypeDefaultDescription
textureBasedynamic—The texture base input consumed by `R_SetLightmapCompatibility`.
bytesPerSampledynamic—The bytes per sample input consumed by `R_SetLightmapCompatibility`.

View source

R_SetLightmapDirtyCompatibility

function R_SetLightmapDirtyCompatibility(page, rectangle, modified)

Apply the Quake-compatible r set lightmap dirty compatibility behavior.

ParameterTypeDefaultDescription
pagedynamic—The page input consumed by `R_SetLightmapDirtyCompatibility`.
rectangledynamic—The rectangle input consumed by `R_SetLightmapDirtyCompatibility`.
modifieddynamic—The modified input consumed by `R_SetLightmapDirtyCompatibility`.

View source

R_SetLightStyleCompatibility

function R_SetLightStyleCompatibility(values)

Apply the Quake-compatible r set light style compatibility behavior.

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `R_SetLightStyleCompatibility`.

View source

R_SetMultitextureCompatibility

function R_SetMultitextureCompatibility(available, enabled)

Apply the Quake-compatible r set multitexture compatibility behavior.

ParameterTypeDefaultDescription
availabledynamic—The available input consumed by `R_SetMultitextureCompatibility`.
enableddynamic—Whether the optional behavior is enabled.

View source

R_SetSubdivideSize

function R_SetSubdivideSize(value)

Apply the Quake-compatible r set subdivide size behavior.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `R_SetSubdivideSize`.

View source

R_SetSurfaceChainCompatibility

function R_SetSurfaceChainCompatibility(textureSort, skySurfaces, waterSurfaces)

Apply the Quake-compatible r set surface chain compatibility behavior.

ParameterTypeDefaultDescription
textureSortdynamic—The texture sort input consumed by `R_SetSurfaceChainCompatibility`.
skySurfacesdynamic—The sky surfaces input consumed by `R_SetSurfaceChainCompatibility`.
waterSurfacesdynamic—The water surfaces input consumed by `R_SetSurfaceChainCompatibility`.

View source

R_SetSurfaceCompatibilityState

function R_SetSurfaceCompatibilityState(index, bitsValue, dlightFrame, cachedValues, cachedDlight, page, lightS, lightT)

Private compatibility-state adapters used by deterministic renderer oracles and by the higher-level MiniQuake host integration.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.
bitsValuedynamic—The bits value input consumed by `R_SetSurfaceCompatibilityState`.
dlightFramedynamic—The dlight frame input consumed by `R_SetSurfaceCompatibilityState`.
cachedValuesdynamic—The cached values input consumed by `R_SetSurfaceCompatibilityState`.
cachedDlightdynamic—The cached dlight input consumed by `R_SetSurfaceCompatibilityState`.
pagedynamic—The page input consumed by `R_SetSurfaceCompatibilityState`.
lightSdynamic—The light s input consumed by `R_SetSurfaceCompatibilityState`.
lightTdynamic—The light t input consumed by `R_SetSurfaceCompatibilityState`.

View source

R_SetTextureAnimationFrame

function R_SetTextureAnimationFrame(frame)

Apply the Quake-compatible r set texture animation frame behavior.

ParameterTypeDefaultDescription
framedynamic—The frame input consumed by `R_SetTextureAnimationFrame`.

View source

R_SpecialCompatibilityState

function R_SpecialCompatibilityState()

Apply the Quake-compatible r special compatibility state behavior.

View source

R_SurfaceFacesViewer

function R_SurfaceFacesViewer(surface, planeDistance)

World surfaces use the exact dot-sign rule from R_RecursiveWorldNode. Underwater polygons bypass back-face rejection because their warped vertices may cross the original plane.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `R_SurfaceFacesViewer`.
planeDistancedynamic—The plane distance input consumed by `R_SurfaceFacesViewer`.

View source

R_TextureAnimation

function R_TextureAnimation(base)

----------------------------------------------------------------------------- gl_rsurf.c -----------------------------------------------------------------------------

ParameterTypeDefaultDescription
basedynamic—The base input consumed by `R_TextureAnimation`.

View source

R_ViewportRect

function R_ViewportRect(viewX, viewY, width, height, screenWidth, screenHeight)

Apply the Quake-compatible r viewport rect behavior.

ParameterTypeDefaultDescription
viewXdynamic—The view x input consumed by `R_ViewportRect`.
viewYdynamic—The view y input consumed by `R_ViewportRect`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
screenWidthdynamic—The screen width input consumed by `R_ViewportRect`.
screenHeightdynamic—The screen height input consumed by `R_ViewportRect`.

View source

r_visframecount

r_visframecount

Tracks the module-level r visframecount state owned by `miniquake.render.world`.

View source

R_WaterPassDeferred

inline function R_WaterPassDeferred(textureSort, waterAlpha)

Apply the Quake-compatible r water pass deferred behavior.

ParameterTypeDefaultDescription
textureSortdynamic—The texture sort input consumed by `R_WaterPassDeferred`.
waterAlphadynamic—The water alpha input consumed by `R_WaterPassDeferred`.

View source

rCompatAbstractSurfaceCalls

rCompatAbstractSurfaceCalls

Tracks the module-level r compat abstract surface calls state owned by `miniquake.render.world`.

View source

rCompatAlphaSkyTexture

rCompatAlphaSkyTexture

Tracks the module-level r compat alpha sky texture state owned by `miniquake.render.world`.

View source

rCompatBlend

rCompatBlend

Tracks the module-level r compat blend state owned by `miniquake.render.world`.

View source

rCompatClearColor

rCompatClearColor

Tracks the module-level r compat clear color state owned by `miniquake.render.world`.

View source

rCompatCollectSequential

rCompatCollectSequential

Tracks the module-level r compat collect sequential state owned by `miniquake.render.world`.

View source

rCompatColoredLighting

rCompatColoredLighting

Tracks the module-level r compat colored lighting state owned by `miniquake.render.world`.

View source

rCompatCull

rCompatCull

Tracks the module-level r compat cull state owned by `miniquake.render.world`.

View source

rCompatDepthFunc

rCompatDepthFunc

Tracks the module-level r compat depth func state owned by `miniquake.render.world`.

View source

rCompatDepthMax

rCompatDepthMax

Tracks the module-level r compat depth max state owned by `miniquake.render.world`.

View source

rCompatDepthMin

rCompatDepthMin

Tracks the module-level r compat depth min state owned by `miniquake.render.world`.

View source

rCompatDlights

rCompatDlights

Tracks the module-level r compat dlights state owned by `miniquake.render.world`.

View source

rCompatDynamic

rCompatDynamic

Tracks the module-level r compat dynamic state owned by `miniquake.render.world`.

View source

rCompatEnhancedBatchKeys

rCompatEnhancedBatchKeys

Tracks the module-level r compat enhanced batch keys state owned by `miniquake.render.world`.

View source

rCompatEnhancedTextureBuilders

rCompatEnhancedTextureBuilders

Tracks the module-level r compat enhanced texture builders state owned by `miniquake.render.world`.

View source

rCompatFinish

rCompatFinish

Tracks the module-level r compat finish state owned by `miniquake.render.world`.

View source

rCompatFlashBlend

rCompatFlashBlend

Tracks the module-level r compat flash blend state owned by `miniquake.render.world`.

View source

rCompatFrameTime

rCompatFrameTime

Tracks the module-level r compat frame time state owned by `miniquake.render.world`.

View source

rCompatLastClearPlan

rCompatLastClearPlan

Tracks the module-level r compat last clear plan state owned by `miniquake.render.world`.

View source

rCompatLightmapAllocated

rCompatLightmapAllocated

Tracks the module-level r compat lightmap allocated state owned by `miniquake.render.world`.

View source

rCompatLightmapBuilders

rCompatLightmapBuilders

Tracks the module-level r compat lightmap builders state owned by `miniquake.render.world`.

View source

rCompatLightmapModified

rCompatLightmapModified

Tracks the module-level r compat lightmap modified state owned by `miniquake.render.world`.

View source

rCompatLightmapRectChange

rCompatLightmapRectChange

Tracks the module-level r compat lightmap rect change state owned by `miniquake.render.world`.

View source

rCompatLightmapScratch

rCompatLightmapScratch

Tracks the module-level r compat lightmap scratch state owned by `miniquake.render.world`.

View source

rCompatLightPlane

rCompatLightPlane

Tracks the module-level r compat light plane state owned by `miniquake.render.world`.

View source

rCompatLightSpot

rCompatLightSpot

Tracks the module-level r compat light spot state owned by `miniquake.render.world`.

View source

rCompatLightStyles

rCompatLightStyles

Tracks the module-level r compat light styles state owned by `miniquake.render.world`.

View source

rCompatMirrorAlpha

rCompatMirrorAlpha

Tracks the module-level r compat mirror alpha state owned by `miniquake.render.world`.

View source

rCompatMirrorChain

rCompatMirrorChain

Tracks the module-level r compat mirror chain state owned by `miniquake.render.world`.

View source

rCompatMirrorTexture

rCompatMirrorTexture

Tracks the module-level r compat mirror texture state owned by `miniquake.render.world`.

View source

rCompatMtexRecordCount

rCompatMtexRecordCount

Tracks the module-level r compat mtex record count state owned by `miniquake.render.world`.

View source

rCompatMtexRecordFaces

rCompatMtexRecordFaces

Tracks the module-level r compat mtex record faces state owned by `miniquake.render.world`.

View source

rCompatMtexRecords

rCompatMtexRecords

Tracks the module-level r compat mtex records state owned by `miniquake.render.world`.

View source

rCompatMtexRecordStamp

rCompatMtexRecordStamp

Tracks the module-level r compat mtex record stamp state owned by `miniquake.render.world`.

View source

rCompatMtexTextureChecked

rCompatMtexTextureChecked

Tracks the module-level r compat mtex texture checked state owned by `miniquake.render.world`.

View source

rCompatMtexTextureIds

rCompatMtexTextureIds

Tracks the module-level r compat mtex texture ids state owned by `miniquake.render.world`.

View source

rCompatMultiTextureAvailable

rCompatMultiTextureAvailable

Tracks the module-level r compat multi texture available state owned by `miniquake.render.world`.

View source

rCompatMultiTextureEnabled

rCompatMultiTextureEnabled

Tracks the module-level r compat multi texture enabled state owned by `miniquake.render.world`.

View source

rCompatNoRefresh

rCompatNoRefresh

Tracks the module-level r compat no refresh state owned by `miniquake.render.world`.

View source

rCompatNoVis

rCompatNoVis

Tracks the module-level r compat no vis state owned by `miniquake.render.world`.

View source

rCompatRealtime

rCompatRealtime

Tracks the module-level r compat realtime state owned by `miniquake.render.world`.

View source

rCompatRenderer

rCompatRenderer

Tracks the module-level r compat renderer state owned by `miniquake.render.world`.

View source

rCompatSequentialBuilder

rCompatSequentialBuilder

Tracks the module-level r compat sequential builder state owned by `miniquake.render.world`.

View source

rCompatSequentialSurfaces

rCompatSequentialSurfaces

Tracks the module-level r compat sequential surfaces state owned by `miniquake.render.world`.

View source

rCompatSkyChain

rCompatSkyChain

Tracks the module-level r compat sky chain state owned by `miniquake.render.world`.

View source

rCompatSkyTexture

rCompatSkyTexture

Tracks the module-level r compat sky texture state owned by `miniquake.render.world`.

View source

rCompatSurfaceBatchKeys

rCompatSurfaceBatchKeys

Tracks the module-level r compat surface batch keys state owned by `miniquake.render.world`.

View source

rCompatSurfaceCachedDlight

rCompatSurfaceCachedDlight

Tracks the module-level r compat surface cached dlight state owned by `miniquake.render.world`.

View source

rCompatSurfaceCachedLight

rCompatSurfaceCachedLight

Tracks the module-level r compat surface cached light state owned by `miniquake.render.world`.

View source

rCompatSurfaceDlightBits

rCompatSurfaceDlightBits

Tracks the module-level r compat surface dlight bits state owned by `miniquake.render.world`.

View source

rCompatSurfaceDlightFrame

rCompatSurfaceDlightFrame

Tracks the module-level r compat surface dlight frame state owned by `miniquake.render.world`.

View source

rCompatSurfaceLightmapPage

rCompatSurfaceLightmapPage

Tracks the module-level r compat surface lightmap page state owned by `miniquake.render.world`.

View source

rCompatSurfaceLightS

rCompatSurfaceLightS

Tracks the module-level r compat surface light s state owned by `miniquake.render.world`.

View source

rCompatSurfaceLightT

rCompatSurfaceLightT

Tracks the module-level r compat surface light t state owned by `miniquake.render.world`.

View source

rCompatSurfaceWarpPolys

rCompatSurfaceWarpPolys

Tracks the module-level r compat surface warp polys state owned by `miniquake.render.world`.

View source

rCompatTextureChainBuilders

rCompatTextureChainBuilders

Tracks the module-level r compat texture chain builders state owned by `miniquake.render.world`.

View source

rCompatTextureChains

rCompatTextureChains

Tracks the module-level r compat texture chains state owned by `miniquake.render.world`.

View source

rCompatTextureSort

rCompatTextureSort

Tracks the module-level r compat texture sort state owned by `miniquake.render.world`.

View source

rCompatTime

rCompatTime

Tracks the module-level r compat time state owned by `miniquake.render.world`.

View source

rCompatTrickFrame

rCompatTrickFrame

Tracks the module-level r compat trick frame state owned by `miniquake.render.world`.

View source

rCompatUseMultitexture

rCompatUseMultitexture

Tracks the module-level r compat use multitexture state owned by `miniquake.render.world`.

View source

rCompatViewAngles

rCompatViewAngles

Tracks the module-level r compat view angles state owned by `miniquake.render.world`.

View source

rCompatViewForward

rCompatViewForward

Tracks the module-level r compat view forward state owned by `miniquake.render.world`.

View source

rCompatViewOrigin

rCompatViewOrigin

Tracks the module-level r compat view origin state owned by `miniquake.render.world`.

View source

rCompatViewRight

rCompatViewRight

Tracks the module-level r compat view right state owned by `miniquake.render.world`.

View source

rCompatViewUp

rCompatViewUp

Tracks the module-level r compat view up state owned by `miniquake.render.world`.

View source

rCompatVisibleNodeRenderer

rCompatVisibleNodeRenderer

R_RecursiveWorldNode must not visit BSP branches which contain no PVS surfaces. GLQuake stores this as node->visframe; MiniQuake keeps the same derived state in a renderer-local byte mask so an unchanged view leaf does not force a complete BSP walk on every displayed frame.

View source

rCompatVisibleNodes

rCompatVisibleNodes

Tracks the module-level r compat visible nodes state owned by `miniquake.render.world`.

View source

rCompatWarpPolys

rCompatWarpPolys

Tracks the module-level r compat warp polys state owned by `miniquake.render.world`.

View source

rCompatWaterChain

rCompatWaterChain

Tracks the module-level r compat water chain state owned by `miniquake.render.world`.

View source

rCompatZTrick

rCompatZTrick

Tracks the module-level r compat z trick state owned by `miniquake.render.world`.

View source

rebuildVisibleNodes

function rebuildVisibleNodes(renderer)

Rebuild the GLQuake-compatible node visibility mask only when the PVS face mask changes. This moves the complete tree scan from every render frame to the much rarer event of entering a different BSP leaf.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

RecursiveLightPoint

function RecursiveLightPoint(nodeNumber, start, finish)

Implements the `RecursiveLightPoint` operation for `miniquake.render.world` (recursive light point).

ParameterTypeDefaultDescription
nodeNumberdynamic—The node number input consumed by `RecursiveLightPoint`.
startdynamic—The start input consumed by `RecursiveLightPoint`.
finishdynamic—The finish input consumed by `RecursiveLightPoint`.

View source

render

function render(renderer, width, height, origin, angles)

Implements the `render` operation for `miniquake.render.world` (render).

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

renderMirrorViewport

function renderMirrorViewport(renderer, width, height, viewRect, origin, angles, dynamicLights, lightStyles, currentTime, realtime, frameTime, blend)

Mirror R_RenderScene pass. The caller submits reflected entities and particles around this world pass, matching gl_rmain.c's host-owned order.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
viewRectdynamic—The view rect input consumed by `renderMirrorViewport`.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.
dynamicLightsdynamic—The dynamic lights input consumed by `renderMirrorViewport`.
lightStylesdynamic—The light styles input consumed by `renderMirrorViewport`.
currentTimedynamic—Time value used by the operation.
realtimedynamic—Time value used by the operation.
frameTimedynamic—Time value used by the operation.
blenddynamic—The blend input consumed by `renderMirrorViewport`.

View source

renderViewport

function renderViewport(renderer, width, height, viewRect, origin, angles, dynamicLights, lightStyles, currentTime, realtime, frameTime, blend)

Render viewport.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
viewRectdynamic—The view rect input consumed by `renderViewport`.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.
dynamicLightsdynamic—The dynamic lights input consumed by `renderViewport`.
lightStylesdynamic—The light styles input consumed by `renderViewport`.
currentTimedynamic—Time value used by the operation.
realtimedynamic—Time value used by the operation.
frameTimedynamic—Time value used by the operation.
blenddynamic—The blend input consumed by `renderViewport`.

View source

setupView

function setupView(width, height, origin, angles)

Update module state for up view.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

setupViewRect

function setupViewRect(viewX, viewY, width, height, screenWidth, screenHeight, fovX, fovY, origin, angles)

Update module state for up view rect.

ParameterTypeDefaultDescription
viewXdynamic—The view x input consumed by `setupViewRect`.
viewYdynamic—The view y input consumed by `setupViewRect`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
screenWidthdynamic—The screen width input consumed by `setupViewRect`.
screenHeightdynamic—The screen height input consumed by `setupViewRect`.
fovXdynamic—The fov x input consumed by `setupViewRect`.
fovYdynamic—The fov y input consumed by `setupViewRect`.
origindynamic—World-space origin of the operation.
anglesdynamic—Orientation angles used by the operation.

View source

skychain

skychain

Tracks the module-level skychain state owned by `miniquake.render.world`.

View source

skytexturenum

skytexturenum

Original MiniQuake globals retained under their public names.

View source

solidskytexture

solidskytexture

Tracks the module-level solidskytexture state owned by `miniquake.render.world`.

View source

speedscale

speedscale

Tracks the module-level speedscale state owned by `miniquake.render.world`.

View source

standaloneModelOrigin

function standaloneModelOrigin(viewOrigin, entity)

Return standalone model origin derived from the active module state.

ParameterTypeDefaultDescription
viewOrigindynamic—The view origin input consumed by `standaloneModelOrigin`.
entitydynamic—Entity affected by the operation.

View source

standaloneSurfaceFacesViewer

function standaloneSurfaceFacesViewer(surface, distance)

Implements the `standaloneSurfaceFacesViewer` operation for `miniquake.render.world` (standalone surface faces viewer).

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `standaloneSurfaceFacesViewer`.
distancedynamic—The distance input consumed by `standaloneSurfaceFacesViewer`.

View source

standaloneTextureId

function standaloneTextureId(renderer, surface, currentTime, alternate)

Implements the `standaloneTextureId` operation for `miniquake.render.world` (standalone texture id).

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `standaloneTextureId`.
currentTimedynamic—Time value used by the operation.
alternatedynamic—The alternate input consumed by `standaloneTextureId`.

View source

startsWith

function startsWith(text, prefix)

Starts s with for `miniquake.render.world`.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.
prefixdynamic—The prefix input consumed by `startsWith`.

View source

SubdividePolygon

function SubdividePolygon(numverts, vertices)

Implements the `SubdividePolygon` operation for `miniquake.render.world` (subdivide polygon).

ParameterTypeDefaultDescription
numvertsdynamic—The numverts input consumed by `SubdividePolygon`.
verticesdynamic—The vertices input consumed by `SubdividePolygon`.

View source

textureFlags

function textureFlags(textureName, faceSide)

Implements the `textureFlags` operation for `miniquake.render.world` (texture flags).

ParameterTypeDefaultDescription
textureNamedynamic—Name that identifies the requested value or resource.
faceSidedynamic—The face side input consumed by `textureFlags`.

View source

textureIdForSurface

function textureIdForSurface(renderer, surface)

Implements the `textureIdForSurface` operation for `miniquake.render.world` (texture id for surface).

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
surfacedynamic—The surface input consumed by `textureIdForSurface`.

View source

upload

function upload(renderer)

Upload the requested value to the active renderer.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

uploadPixels

function uploadPixels(width, height, rgba, nearest)

Upload pixels to the active renderer.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
rgbadynamic—The rgba input consumed by `uploadPixels`.
nearestdynamic—The nearest input consumed by `uploadPixels`.

View source

uploadStandaloneBrush

function uploadStandaloneBrush(renderer)

Upload standalone brush to the active renderer.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.

View source

ViewContents

function ViewContents(renderer, viewOrigin)

R_SetupFrame assigns r_viewleaf from the final (possibly chase-adjusted) r_refdef.vieworg before it selects the contents cshift.

ParameterTypeDefaultDescription
rendererdynamic—Renderer instance or backend used for drawing.
viewOrigindynamic—The view origin input consumed by `ViewContents`.

View source

visibleFaceCountLeaf

visibleFaceCountLeaf

Tracks the module-level visible face count leaf state owned by `miniquake.render.world`.

View source

visibleFaceCountRenderer

visibleFaceCountRenderer

Tracks the module-level visible face count renderer state owned by `miniquake.render.world`.

View source

visibleFaceCountValue

visibleFaceCountValue

Tracks the module-level visible face count value state owned by `miniquake.render.world`.

View source

waterchain

waterchain

Tracks the module-level waterchain state owned by `miniquake.render.world`.

View source

worldSurfaceRoots

worldSurfaceRoots

The generated collector scans package globals directly. Keep the active surface graph in such a root because reaching it only through GameSession -> WorldRenderer -> surfaces is not reliable across allocations performed while the entity renderer is built.

View source