# active_lightmaps
active_lightmapsTracks the module-level active lightmaps state owned by `miniquake.render.world`.
src/miniquake/render/world.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/byteio.ml as byteio → src/miniquake/byteio.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/format/bsp.ml as bsp → src/miniquake/format/bsp.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/optimization_baseline.ml as optBaseline → src/miniquake/optimization_baseline.mlminiquake/render/colored_lightmaps.ml as coloredLightmaps → src/miniquake/render/colored_lightmaps.mlminiquake/render/draw2d.ml as draw2d → src/miniquake/render/draw2d.mlminiquake/render/enhanced.ml as enhanced → src/miniquake/render/enhanced.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlminiquake/render/gl_rlight.ml as glRlight → src/miniquake/render/gl_rlight.mlminiquake/render/gl_warp.ml as glWarp → src/miniquake/render/gl_warp.mlminiquake/render/ray_shadow.ml as rayShadow → src/miniquake/render/ray_shadow.mlminiquake/render/special_paths.ml as specialPaths → src/miniquake/render/special_paths.mlminiquake/types.ml as t → src/miniquake/types.mlminiquake/world_bsp.ml as world → src/miniquake/world_bsp.mlactive_lightmapsTracks the module-level active lightmaps state owned by `miniquake.render.world`.
function AddLightBlend(red, green, blue, alpha2)Add state for add light blend.
| Parameter | Type | Default | Description |
|---|---|---|---|
red | dynamic | — | The red input consumed by `AddLightBlend`. |
green | dynamic | — | The green input consumed by `AddLightBlend`. |
blue | dynamic | — | The blue input consumed by `AddLightBlend`. |
alpha2 | dynamic | — | The alpha2 input consumed by `AddLightBlend`. |
allocatedTracks the module-level allocated state owned by `miniquake.render.world`.
function AllocBlock(width, height, xOut, yOut)Create and initialize block.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
xOut | dynamic | — | The x out input consumed by `AllocBlock`. |
yOut | dynamic | — | The y out input consumed by `AllocBlock`. |
alphaskytextureTracks the module-level alphaskytexture state owned by `miniquake.render.world`.
blocklightsTracks the module-level blocklights state owned by `miniquake.render.world`.
function BoundPoly(numverts, vertices, minimums, maximums)----------------------------------------------------------------------------- gl_warp.c -----------------------------------------------------------------------------
| Parameter | Type | Default | Description |
|---|---|---|---|
numverts | dynamic | — | The numverts input consumed by `BoundPoly`. |
vertices | dynamic | — | The vertices input consumed by `BoundPoly`. |
minimums | dynamic | — | The minimums input consumed by `BoundPoly`. |
maximums | dynamic | — | The maximums input consumed by `BoundPoly`. |
function buildLightmap(renderer, surface)Create and initialize lightmap.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `buildLightmap`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `buildStandaloneLightmap`. |
function buildSurface(map, faceIndex, underwaterFlags)Create and initialize surface.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `buildSurface`. |
faceIndex | dynamic | — | Zero-based index of the requested entry. |
underwaterFlags | dynamic | — | The underwater flags input consumed by `buildSurface`. |
function BuildSurfaceDisplayList(surface)Create and initialize surface display list.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `BuildSurfaceDisplayList`. |
function buildUnderwaterFlags(map)Create and initialize underwater flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `buildUnderwaterFlags`. |
c_brush_polysTracks the module-level c brush polys state owned by `miniquake.render.world`.
function ceilValue(value)Return ceil value derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `ceilValue`. |
clearStaticCacheOnCreateTracks the module-level clear static cache on create state owned by `miniquake.render.world`.
coloredLightmapsRequestedTracks the module-level colored lightmaps requested state owned by `miniquake.render.world`.
inline function compatAbs(value)Implements the `compatAbs` operation for `miniquake.render.world` (compat abs).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `compatAbs`. |
function compatAddLightmapPoly(page, value)Implements the `compatAddLightmapPoly` operation for `miniquake.render.world` (compat add lightmap poly).
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `compatAddLightmapPoly`. |
value | dynamic | — | Value consumed by `compatAddLightmapPoly`. |
function compatAssignLightBlend(updated)Implements the `compatAssignLightBlend` operation for `miniquake.render.world` (compat assign light blend).
| Parameter | Type | Default | Description |
|---|---|---|---|
updated | dynamic | — | The updated input consumed by `compatAssignLightBlend`. |
function compatBrushModelOrigin(entity)Return compat brush model origin derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
function compatClearTextureChain(index)Clear one consumed texture chain without discarding its reusable capacity.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the requested entry. |
function compatContainsInteger(values, wanted)Implements the `compatContainsInteger` operation for `miniquake.render.world` (compat contains integer).
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `compatContainsInteger`. |
wanted | dynamic | — | The wanted input consumed by `compatContainsInteger`. |
function compatCopySurfaceLightmapToAtlas(surface, pixels)Implements the `compatCopySurfaceLightmapToAtlas` operation for `miniquake.render.world` (compat copy surface lightmap to atlas).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatCopySurfaceLightmapToAtlas`. |
pixels | dynamic | — | The pixels input consumed by `compatCopySurfaceLightmapToAtlas`. |
function compatEmptyPlane()Implements the `compatEmptyPlane` operation for `miniquake.render.world` (compat empty plane).
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `compatEnhancedBatchKeys`. |
count | dynamic | — | Number of entries or units to process. |
function compatEnsureArraySize(values, count, fillValue)Return compat ensure array size derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `compatEnsureArraySize`. |
count | dynamic | — | Number of entries or units to process. |
fillValue | dynamic | — | The fill value input consumed by `compatEnsureArraySize`. |
function compatEnsureEnhancedBuilders()Ensure one persistent surface builder per BSP texture for the enhanced additive pass. Reusing these builders avoids per-frame chain allocations.
function compatEnsureWorldState()Return compat ensure world state derived from the active module state.
function compatFace(surface)Implements the `compatFace` operation for `miniquake.render.world` (compat face).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatFace`. |
function compatFinishLightmapChain(page)Implements the `compatFinishLightmapChain` operation for `miniquake.render.world` (compat finish lightmap chain).
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `compatFinishLightmapChain`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the requested entry. |
function compatFnv1a(data, offset, count)Implements the `compatFnv1a` operation for `miniquake.render.world` (compat fnv1a).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
count | dynamic | — | Number of entries or units to process. |
function compatFreshLightmapAllocation()Implements the `compatFreshLightmapAllocation` operation for `miniquake.render.world` (compat fresh lightmap allocation).
function compatHashLightmapRows(page, firstRow, rowCount)Implements the `compatHashLightmapRows` operation for `miniquake.render.world` (compat hash lightmap rows).
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `compatHashLightmapRows`. |
firstRow | dynamic | — | The first row input consumed by `compatHashLightmapRows`. |
rowCount | dynamic | — | Number of entries or units to process. |
function compatLightmapFormat()Return the active atlas transfer format without changing compatibility traces for ordinary grayscale BSP light data.
function compatMultitextureRecords(surfaces, surfaceCount)Implements the `compatMultitextureRecords` operation for `miniquake.render.world` (compat multitexture records).
| Parameter | Type | Default | Description |
|---|---|---|---|
surfaces | dynamic | — | The surfaces input consumed by `compatMultitextureRecords`. |
surfaceCount | dynamic | — | Number of entries or units to process. |
function compatPlane(surface)Implements the `compatPlane` operation for `miniquake.render.world` (compat plane).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatPlane`. |
function compatPlaneDistance(plane, point)Implements the `compatPlaneDistance` operation for `miniquake.render.world` (compat plane distance).
| Parameter | Type | Default | Description |
|---|---|---|---|
plane | dynamic | — | The plane input consumed by `compatPlaneDistance`. |
point | dynamic | — | The point input consumed by `compatPlaneDistance`. |
function compatPrepareBatchedBrushPoly(surface)Implements the `compatPrepareBatchedBrushPoly` operation for `miniquake.render.world` (compat prepare batched brush poly).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatPrepareBatchedBrushPoly`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
nodeNumber | dynamic | — | The node number input consumed by `compatRecursiveWorldNode`. |
nodeCount | dynamic | — | Number of entries or units to process. |
surfaceCount | dynamic | — | Number of entries or units to process. |
visibleFaceCount | dynamic | — | Number of entries or units to process. |
useVisibleMask | dynamic | — | The use visible mask input consumed by `compatRecursiveWorldNode`. |
function compatRenderDynamicLightmaps(surface, addToChain)Implements the `compatRenderDynamicLightmaps` operation for `miniquake.render.world` (compat render dynamic lightmaps).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatRenderDynamicLightmaps`. |
addToChain | dynamic | — | The add to chain input consumed by `compatRenderDynamicLightmaps`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `compatResetLightmapRectangle`. |
function compatSurface(surface)Implements the `compatSurface` operation for `miniquake.render.world` (compat surface).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatSurface`. |
function compatSurfaceBatchKeys(surfaces)Implements the `compatSurfaceBatchKeys` operation for `miniquake.render.world` (compat surface batch keys).
| Parameter | Type | Default | Description |
|---|---|---|---|
surfaces | dynamic | — | The surfaces input consumed by `compatSurfaceBatchKeys`. |
function compatSurfaceIndex(surface)Return compat surface index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatSurfaceIndex`. |
function compatTexInfo(surface)Implements the `compatTexInfo` operation for `miniquake.render.world` (compat tex info).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `compatTexInfo`. |
function compatUploadLightmapSubImage(page, rectangle)Transfer one dirty atlas rectangle using the format selected at map load.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `compatUploadLightmapSubImage`. |
rectangle | dynamic | — | The rectangle input consumed by `compatUploadLightmapSubImage`. |
function compatZeroVector()Return compat zero vector derived from the active module state.
function countVisibleFaces(visibleFaces)Report whether count visible faces holds for the active state.
| Parameter | Type | Default | Description |
|---|---|---|---|
visibleFaces | dynamic | — | The visible faces input consumed by `countVisibleFaces`. |
function create(map, palette)Implements the `create` operation for `miniquake.render.world` (create).
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `create`. |
palette | dynamic | — | The palette input consumed by `create`. |
function createExternal(map, palette)Create and initialize external.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `createExternal`. |
palette | dynamic | — | The palette input consumed by `createExternal`. |
currentTextureFrameTracks the module-level current texture frame state owned by `miniquake.render.world`.
d_lightstylevalueTracks the module-level d lightstylevalue state owned by `miniquake.render.world`.
function destroy(renderer)Implements the `destroy` operation for `miniquake.render.world` (destroy).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function destroyStandaloneBrush(renderer)Release resources owned by standalone brush.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function drawBaseSurface(renderer, surface)Render base surface.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `drawBaseSurface`. |
function DrawGLPoly(poly)Render glpoly.
| Parameter | Type | Default | Description |
|---|---|---|---|
poly | dynamic | — | The poly input consumed by `DrawGLPoly`. |
function DrawGLWaterPoly(poly)Render glwater poly.
| Parameter | Type | Default | Description |
|---|---|---|---|
poly | dynamic | — | The poly input consumed by `DrawGLWaterPoly`. |
function DrawGLWaterPolyLightmap(poly)Render glwater poly lightmap.
| Parameter | Type | Default | Description |
|---|---|---|---|
poly | dynamic | — | The poly input consumed by `DrawGLWaterPolyLightmap`. |
function drawLightSurface(surface)Render light surface.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `drawLightSurface`. |
function drawStandaloneBase(renderer, surface, currentTime, alternate)Render standalone base.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `drawStandaloneBase`. |
currentTime | dynamic | — | Time value used by the operation. |
alternate | dynamic | — | The alternate input consumed by `drawStandaloneBase`. |
function drawStandaloneBrush(renderer, entity, viewOrigin, currentTime)Render standalone brush.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
entity | dynamic | — | Entity affected by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `drawStandaloneBrush`. |
currentTime | dynamic | — | Time value used by the operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
entity | dynamic | — | Entity affected by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `drawStandaloneBrushEnhanced`. |
currentTime | dynamic | — | Time value used by the operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
entity | dynamic | — | Entity affected by the operation. |
floorWorldZ | dynamic | — | The floor world z input consumed by `drawStandaloneBrushShadow`. |
offsetX | dynamic | — | The offset x input consumed by `drawStandaloneBrushShadow`. |
offsetY | dynamic | — | The offset y input consumed by `drawStandaloneBrushShadow`. |
contactOnly | dynamic | — | The contact only input consumed by `drawStandaloneBrushShadow`. |
pointLightActive | dynamic | — | The point light active input consumed by `drawStandaloneBrushShadow`. |
lightX | dynamic | — | The light x input consumed by `drawStandaloneBrushShadow`. |
lightY | dynamic | — | The light y input consumed by `drawStandaloneBrushShadow`. |
lightZ | dynamic | — | The light z input consumed by `drawStandaloneBrushShadow`. |
function drawStandaloneLight(surface)Render standalone light.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `drawStandaloneLight`. |
function DrawTextureChains()Render texture chains.
function EmitBothSkyLayers(surface)Add both sky layers to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `EmitBothSkyLayers`. |
function EmitSkyPolys(surface)Add sky polys to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `EmitSkyPolys`. |
function EmitWaterPolys(surface)Add water polys to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `EmitWaterPolys`. |
function faceVertex(map, face, edgeNumber)Implements the `faceVertex` operation for `miniquake.render.world` (face vertex).
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `faceVertex`. |
face | dynamic | — | The face input consumed by `faceVertex`. |
edgeNumber | dynamic | — | The edge number input consumed by `faceVertex`. |
function floorValue(value)Implements the `floorValue` operation for `miniquake.render.world` (floor value).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `floorValue`. |
function GL_BuildLightmaps()Mirror Quake's GL_BuildLightmaps routine and its observable state changes.
function GL_CreateSurfaceLightmap(surface)Mirror Quake's GL_CreateSurfaceLightmap routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `GL_CreateSurfaceLightmap`. |
function GL_DisableMultitexture()Mirror Quake's GL_DisableMultitexture routine and its observable state changes.
function GL_EnableMultitexture()Mirror Quake's GL_EnableMultitexture routine and its observable state changes.
function GL_SubdivideSurface(surface)Mirror Quake's GL_SubdivideSurface routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `GL_SubdivideSurface`. |
const GLQUAKE_BACKFACE_EPSILON = 1.e-002Defines the glquake backface epsilon value used by `miniquake.render.world`.
const GLQUAKE_BLOCK_HEIGHT = 128Defines the glquake block height value used by `miniquake.render.world`.
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.
=============================================================================
const GLQUAKE_MAX_LIGHTMAPS = 64Defines the glquake max lightmaps value used by `miniquake.render.world`.
const GLQUAKE_PLANE_ANYZ = 5Defines the glquake plane anyz value used by `miniquake.render.world`.
const GLQUAKE_SURF_UNDERWATER = 128Defines the glquake surf underwater value used by `miniquake.render.world`.
const GLQUAKE_TURBSCALE = 40.7436654315252Defines the glquake turbscale value used by `miniquake.render.world`.
function indexedToRgba(indexed, palette, transparent)Implements the `indexedToRgba` operation for `miniquake.render.world` (indexed to rgba).
| Parameter | Type | Default | Description |
|---|---|---|---|
indexed | dynamic | — | The indexed input consumed by `indexedToRgba`. |
palette | dynamic | — | The palette input consumed by `indexedToRgba`. |
transparent | dynamic | — | The transparent input consumed by `indexedToRgba`. |
lightmap_bytesTracks the module-level lightmap bytes state owned by `miniquake.render.world`.
lightmap_modifiedTracks the module-level lightmap modified state owned by `miniquake.render.world`.
lightmap_polysTracks the module-level lightmap polys state owned by `miniquake.render.world`.
lightmap_rectchangeTracks the module-level lightmap rectchange state owned by `miniquake.render.world`.
lightmap_texturesTracks the module-level lightmap textures state owned by `miniquake.render.world`.
lightmapsTracks the module-level lightmaps state owned by `miniquake.render.world`.
lightplaneTracks the module-level lightplane state owned by `miniquake.render.world`.
lightspotTracks the module-level lightspot state owned by `miniquake.render.world`.
function markAllVisible(renderer)Report whether mark all visible holds for the active state.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function markVisible(renderer, viewOrigin)Report whether mark visible holds for the active state.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
viewOrigin | dynamic | — | The view origin input consumed by `markVisible`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `markVisibleNodeSubtree`. |
visibility | dynamic | — | The visibility input consumed by `markVisibleNodeSubtree`. |
currentLeaf | dynamic | — | The current leaf input consumed by `markVisibleNodeSubtree`. |
rowBytes | dynamic | — | Byte data consumed by the operation. |
visibleNodes | dynamic | — | The visible nodes input consumed by `markVisibleNodeSubtree`. |
nodeNumber | dynamic | — | The node number input consumed by `markVisibleNodeSubtree`. |
mirrorTracks the module-level mirror state owned by `miniquake.render.world`.
mirror_planeTracks the module-level mirror plane state owned by `miniquake.render.world`.
function missingTexturePixels()Implements the `missingTexturePixels` operation for `miniquake.render.world` (missing texture pixels).
mtexenabledTracks the module-level mtexenabled state owned by `miniquake.render.world`.
nColinElimTracks the module-level n colin elim state owned by `miniquake.render.world`.
function precacheStaticGeometry(renderer)Preload and register the static geometry asset.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function R_ActiveDynamicLights()Apply the Quake-compatible r active dynamic lights behavior.
function R_AddDynamicLights(surface)Apply the Quake-compatible r add dynamic lights behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_AddDynamicLights`. |
function R_AdvanceFrameCounters()Internal package-state adapters used by gl_rmain.c/gl_rmisc.c compatibility.
function R_AnimateLight()----------------------------------------------------------------------------- gl_rlight.c -----------------------------------------------------------------------------
function R_BeginWorldFrame()Apply the Quake-compatible r begin world frame behavior.
function R_BlendLightmaps()Apply the Quake-compatible r blend lightmaps behavior.
function R_BrushSurfaceFacesViewer(surface, planeDistance)Brush models use BACKFACE_EPSILON and the opposite-facing test from R_DrawBrushModel.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_BrushSurfaceFacesViewer`. |
planeDistance | dynamic | — | The plane distance input consumed by `R_BrushSurfaceFacesViewer`. |
function R_BuildLightMap(surface, destination, stride)Apply the Quake-compatible r build light map behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_BuildLightMap`. |
destination | dynamic | — | Destination value or collection to update. |
stride | dynamic | — | The stride input consumed by `R_BuildLightMap`. |
function R_ChainSurface(surface)Apply the Quake-compatible r chain surface behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_ChainSurface`. |
function R_ClearLightmapChains()Apply the Quake-compatible r clear lightmap chains behavior.
function R_ClearProduction()Apply the Quake-compatible r clear production behavior.
function R_CollectLightmapTextureIds(renderer)Apply the Quake-compatible r collect lightmap texture ids behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
requestedEnabled | dynamic | — | The requested enabled input consumed by `R_ConfigureEnhancedLighting`. |
requestedShadows | dynamic | — | The requested shadows input consumed by `R_ConfigureEnhancedLighting`. |
shadowQuality | dynamic | — | The shadow quality input consumed by `R_ConfigureEnhancedLighting`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
mirrorAlpha | dynamic | — | The mirror alpha input consumed by `R_ConfigureSpecialCompatibility`. |
clearColor | dynamic | — | The clear color input consumed by `R_ConfigureSpecialCompatibility`. |
zTrick | dynamic | — | The z trick input consumed by `R_ConfigureSpecialCompatibility`. |
finishBeforeRender | dynamic | — | The finish before render input consumed by `R_ConfigureSpecialCompatibility`. |
noRefresh | dynamic | — | The no refresh input consumed by `R_ConfigureSpecialCompatibility`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
viewOrigin | dynamic | — | The view origin input consumed by `R_ConfigureWorldCompatibility`. |
viewAngles | dynamic | — | The view angles input consumed by `R_ConfigureWorldCompatibility`. |
viewForward | dynamic | — | The view forward input consumed by `R_ConfigureWorldCompatibility`. |
viewRight | dynamic | — | The view right input consumed by `R_ConfigureWorldCompatibility`. |
viewUp | dynamic | — | The view up input consumed by `R_ConfigureWorldCompatibility`. |
dynamicLights | dynamic | — | The dynamic lights input consumed by `R_ConfigureWorldCompatibility`. |
lightStyles | dynamic | — | The light styles input consumed by `R_ConfigureWorldCompatibility`. |
blend | dynamic | — | The blend input consumed by `R_ConfigureWorldCompatibility`. |
currentTime | dynamic | — | Time value used by the operation. |
realtime | dynamic | — | Time value used by the operation. |
frameTime | dynamic | — | Time value used by the operation. |
flashBlend | dynamic | — | The flash blend input consumed by `R_ConfigureWorldCompatibility`. |
dynamicEnabled | dynamic | — | The dynamic enabled input consumed by `R_ConfigureWorldCompatibility`. |
noVis | dynamic | — | The no vis input consumed by `R_ConfigureWorldCompatibility`. |
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.
function R_CurrentDepthMaximum()Mirror Quake's R_CurrentDepthMaximum routine and its observable state changes.
function R_CurrentDepthMinimum()Mirror Quake's R_CurrentDepthMinimum routine and its observable state changes.
function R_CurrentDepthRange()Apply the Quake-compatible r current depth range behavior.
function R_CurrentViewOrigin()Apply the Quake-compatible r current view origin behavior.
function R_CurrentWorldMap()Return the active main BSP map used by entity shadow-ray projection.
function R_CurrentWorldSurfaces()Return the active render-surface graph used by arbitrary BSP shadow rays.
r_dlightframecountTracks the module-level r dlightframecount state owned by `miniquake.render.world`.
function R_DrawBrushModel(entity)Apply the Quake-compatible r draw brush model behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
submodelIndex | dynamic | — | Zero-based index of the requested entry. |
function R_DrawBrushModelForSubmodel(entity, submodelIndex)Apply the Quake-compatible r draw brush model for submodel behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
submodelIndex | dynamic | — | Zero-based index of the requested entry. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
submodelIndex | dynamic | — | Zero-based index of the requested entry. |
floorWorldZ | dynamic | — | The floor world z input consumed by `R_DrawBrushModelShadowForSubmodel`. |
offsetX | dynamic | — | The offset x input consumed by `R_DrawBrushModelShadowForSubmodel`. |
offsetY | dynamic | — | The offset y input consumed by `R_DrawBrushModelShadowForSubmodel`. |
contactOnly | dynamic | — | The contact only input consumed by `R_DrawBrushModelShadowForSubmodel`. |
pointLightActive | dynamic | — | The point light active input consumed by `R_DrawBrushModelShadowForSubmodel`. |
lightX | dynamic | — | The light x input consumed by `R_DrawBrushModelShadowForSubmodel`. |
lightY | dynamic | — | The light y input consumed by `R_DrawBrushModelShadowForSubmodel`. |
lightZ | dynamic | — | The light z input consumed by `R_DrawBrushModelShadowForSubmodel`. |
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.
function R_DrawMirrorOverlay(width, height, viewRect, origin, angles)Apply the Quake-compatible r draw mirror overlay behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
viewRect | dynamic | — | The view rect input consumed by `R_DrawMirrorOverlay`. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
function R_DrawMultitextureBatch(surfaces, surfaceCount)Apply the Quake-compatible r draw multitexture batch behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surfaces | dynamic | — | The surfaces input consumed by `R_DrawMultitextureBatch`. |
surfaceCount | dynamic | — | Number of entries or units to process. |
function R_DrawSequentialPoly(surface)Apply the Quake-compatible r draw sequential poly behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_DrawSequentialPoly`. |
function R_DrawSkyChain(chain)Apply the Quake-compatible r draw sky chain behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
chain | dynamic | — | The chain input consumed by `R_DrawSkyChain`. |
function R_DrawWaterSurfaces()Apply the Quake-compatible r draw water surfaces behavior.
function R_DrawWorld()Apply the Quake-compatible r draw world behavior.
inline function R_DynamicLightIsActive(light, currentTime)Apply the Quake-compatible r dynamic light is active behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
light | dynamic | — | The light input consumed by `R_DynamicLightIsActive`. |
currentTime | dynamic | — | Time value used by the operation. |
r_framecountTracks the module-level r framecount state owned by `miniquake.render.world`.
function R_GetAllocationCompatibilityState(page)Apply the Quake-compatible r get allocation compatibility state behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `R_GetAllocationCompatibilityState`. |
function R_GetBlocklights()Apply the Quake-compatible r get blocklights behavior.
function R_GetDynamicLightCompatibilityState(index)Apply the Quake-compatible r get dynamic light compatibility state behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the requested entry. |
function R_GetFrameCompatibility()Apply the Quake-compatible r get frame compatibility behavior.
function R_GetLightmapBytes()Apply the Quake-compatible r get lightmap bytes behavior.
function R_GetLightmapCompatibilityState(page)Apply the Quake-compatible r get lightmap compatibility state behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `R_GetLightmapCompatibilityState`. |
function R_GetMirrorCompatibilityState()Apply the Quake-compatible r get mirror compatibility state behavior.
function R_GetSurfaceCompatibilityState(index)Apply the Quake-compatible r get surface compatibility state behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the requested entry. |
function R_GetTextureChains()Apply the Quake-compatible r get texture chains behavior.
function R_InitSky(texture)Apply the Quake-compatible r init sky behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
function R_LightmapRequiredBytes(width, height, stride, bytesPerSample)Apply the Quake-compatible r lightmap required bytes behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
stride | dynamic | — | The stride input consumed by `R_LightmapRequiredBytes`. |
bytesPerSample | dynamic | — | The bytes per sample input consumed by `R_LightmapRequiredBytes`. |
function R_LightPoint(point)Apply the Quake-compatible r light point behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
point | dynamic | — | The point input consumed by `R_LightPoint`. |
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.
function R_MainRenderStageOrder()Apply the Quake-compatible r main render stage order behavior.
function R_MarkBrushModelLights(entity)Apply the Quake-compatible r mark brush model lights behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
function R_MarkBrushModelLightsForSubmodel(entity, submodelIndex)Apply the Quake-compatible r mark brush model lights for submodel behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
submodelIndex | dynamic | — | Zero-based index of the requested entry. |
function R_MarkLeaves()Apply the Quake-compatible r mark leaves behavior.
function R_MarkLights(light, bit, nodeNumber)Apply the Quake-compatible r mark lights behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
light | dynamic | — | The light input consumed by `R_MarkLights`. |
bit | dynamic | — | The bit input consumed by `R_MarkLights`. |
nodeNumber | dynamic | — | The node number input consumed by `R_MarkLights`. |
function R_MirrorChain(surface)Apply the Quake-compatible r mirror chain behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_MirrorChain`. |
function R_MirrorChainCount()Apply the Quake-compatible r mirror chain count behavior.
function R_MirrorProjectionScale()Apply the Quake-compatible r mirror projection scale behavior.
inline function R_MirrorReady()Apply the Quake-compatible r mirror ready behavior.
function R_MirrorView(origin, angles)Apply the Quake-compatible r mirror view behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
blend | dynamic | — | The blend input consumed by `R_PolyBlendProduction`. |
enabled | dynamic | — | Whether the optional behavior is enabled. |
function R_PushDlights()Apply the Quake-compatible r push dlights behavior.
function R_RecursiveWorldNode(nodeNumber)Apply the Quake-compatible r recursive world node behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
nodeNumber | dynamic | — | The node number input consumed by `R_RecursiveWorldNode`. |
function R_RenderBrushPoly(surface)Apply the Quake-compatible r render brush poly behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_RenderBrushPoly`. |
function R_RenderDlight(light)Apply the Quake-compatible r render dlight behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
light | dynamic | — | The light input consumed by `R_RenderDlight`. |
function R_RenderDlights()Apply the Quake-compatible r render dlights behavior.
function R_RenderDynamicLightmaps(surface)Apply the Quake-compatible r render dynamic lightmaps behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_RenderDynamicLightmaps`. |
function R_ResetLightmapCompatibility()Apply the Quake-compatible r reset lightmap compatibility behavior.
function R_ResetLightStyles(value)Apply the Quake-compatible r reset light styles behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `R_ResetLightStyles`. |
function R_ResetMirrorCompatibility()Apply the Quake-compatible r reset mirror compatibility behavior.
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.
function R_ResetWorldCompatibility()Apply the Quake-compatible r reset world compatibility behavior.
function R_SetAbstractSurfaceCalls(enabled)Apply the Quake-compatible r set abstract surface calls behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
function R_SetCullCompatibility(enabled)Apply the Quake-compatible r set cull compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
function R_SetFrameCompatibility(frame, visFrame)Apply the Quake-compatible r set frame compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
frame | dynamic | — | The frame input consumed by `R_SetFrameCompatibility`. |
visFrame | dynamic | — | The vis frame input consumed by `R_SetFrameCompatibility`. |
function R_SetLightmapChainCompatibility(page, surfaces)Apply the Quake-compatible r set lightmap chain compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `R_SetLightmapChainCompatibility`. |
surfaces | dynamic | — | The surfaces input consumed by `R_SetLightmapChainCompatibility`. |
function R_SetLightmapCompatibility(textureBase, bytesPerSample)Apply the Quake-compatible r set lightmap compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
textureBase | dynamic | — | The texture base input consumed by `R_SetLightmapCompatibility`. |
bytesPerSample | dynamic | — | The bytes per sample input consumed by `R_SetLightmapCompatibility`. |
function R_SetLightmapDirtyCompatibility(page, rectangle, modified)Apply the Quake-compatible r set lightmap dirty compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | dynamic | — | The page input consumed by `R_SetLightmapDirtyCompatibility`. |
rectangle | dynamic | — | The rectangle input consumed by `R_SetLightmapDirtyCompatibility`. |
modified | dynamic | — | The modified input consumed by `R_SetLightmapDirtyCompatibility`. |
function R_SetLightStyleCompatibility(values)Apply the Quake-compatible r set light style compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `R_SetLightStyleCompatibility`. |
function R_SetMultitextureCompatibility(available, enabled)Apply the Quake-compatible r set multitexture compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
available | dynamic | — | The available input consumed by `R_SetMultitextureCompatibility`. |
enabled | dynamic | — | Whether the optional behavior is enabled. |
function R_SetSubdivideSize(value)Apply the Quake-compatible r set subdivide size behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `R_SetSubdivideSize`. |
function R_SetSurfaceChainCompatibility(textureSort, skySurfaces, waterSurfaces)Apply the Quake-compatible r set surface chain compatibility behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
textureSort | dynamic | — | The texture sort input consumed by `R_SetSurfaceChainCompatibility`. |
skySurfaces | dynamic | — | The sky surfaces input consumed by `R_SetSurfaceChainCompatibility`. |
waterSurfaces | dynamic | — | The water surfaces input consumed by `R_SetSurfaceChainCompatibility`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the requested entry. |
bitsValue | dynamic | — | The bits value input consumed by `R_SetSurfaceCompatibilityState`. |
dlightFrame | dynamic | — | The dlight frame input consumed by `R_SetSurfaceCompatibilityState`. |
cachedValues | dynamic | — | The cached values input consumed by `R_SetSurfaceCompatibilityState`. |
cachedDlight | dynamic | — | The cached dlight input consumed by `R_SetSurfaceCompatibilityState`. |
page | dynamic | — | The page input consumed by `R_SetSurfaceCompatibilityState`. |
lightS | dynamic | — | The light s input consumed by `R_SetSurfaceCompatibilityState`. |
lightT | dynamic | — | The light t input consumed by `R_SetSurfaceCompatibilityState`. |
function R_SetTextureAnimationFrame(frame)Apply the Quake-compatible r set texture animation frame behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
frame | dynamic | — | The frame input consumed by `R_SetTextureAnimationFrame`. |
function R_SpecialCompatibilityState()Apply the Quake-compatible r special compatibility state behavior.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `R_SurfaceFacesViewer`. |
planeDistance | dynamic | — | The plane distance input consumed by `R_SurfaceFacesViewer`. |
function R_TextureAnimation(base)----------------------------------------------------------------------------- gl_rsurf.c -----------------------------------------------------------------------------
| Parameter | Type | Default | Description |
|---|---|---|---|
base | dynamic | — | The base input consumed by `R_TextureAnimation`. |
function R_ViewportRect(viewX, viewY, width, height, screenWidth, screenHeight)Apply the Quake-compatible r viewport rect behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
viewX | dynamic | — | The view x input consumed by `R_ViewportRect`. |
viewY | dynamic | — | The view y input consumed by `R_ViewportRect`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
screenWidth | dynamic | — | The screen width input consumed by `R_ViewportRect`. |
screenHeight | dynamic | — | The screen height input consumed by `R_ViewportRect`. |
r_visframecountTracks the module-level r visframecount state owned by `miniquake.render.world`.
inline function R_WaterPassDeferred(textureSort, waterAlpha)Apply the Quake-compatible r water pass deferred behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
textureSort | dynamic | — | The texture sort input consumed by `R_WaterPassDeferred`. |
waterAlpha | dynamic | — | The water alpha input consumed by `R_WaterPassDeferred`. |
rCompatAbstractSurfaceCallsTracks the module-level r compat abstract surface calls state owned by `miniquake.render.world`.
rCompatAlphaSkyTextureTracks the module-level r compat alpha sky texture state owned by `miniquake.render.world`.
rCompatBlendTracks the module-level r compat blend state owned by `miniquake.render.world`.
rCompatClearColorTracks the module-level r compat clear color state owned by `miniquake.render.world`.
rCompatCollectSequentialTracks the module-level r compat collect sequential state owned by `miniquake.render.world`.
rCompatColoredLightingTracks the module-level r compat colored lighting state owned by `miniquake.render.world`.
rCompatCullTracks the module-level r compat cull state owned by `miniquake.render.world`.
rCompatDepthFuncTracks the module-level r compat depth func state owned by `miniquake.render.world`.
rCompatDepthMaxTracks the module-level r compat depth max state owned by `miniquake.render.world`.
rCompatDepthMinTracks the module-level r compat depth min state owned by `miniquake.render.world`.
rCompatDlightsTracks the module-level r compat dlights state owned by `miniquake.render.world`.
rCompatDynamicTracks the module-level r compat dynamic state owned by `miniquake.render.world`.
rCompatEnhancedBatchKeysTracks the module-level r compat enhanced batch keys state owned by `miniquake.render.world`.
rCompatEnhancedTextureBuildersTracks the module-level r compat enhanced texture builders state owned by `miniquake.render.world`.
rCompatFinishTracks the module-level r compat finish state owned by `miniquake.render.world`.
rCompatFlashBlendTracks the module-level r compat flash blend state owned by `miniquake.render.world`.
rCompatFrameTimeTracks the module-level r compat frame time state owned by `miniquake.render.world`.
rCompatLastClearPlanTracks the module-level r compat last clear plan state owned by `miniquake.render.world`.
rCompatLightmapAllocatedTracks the module-level r compat lightmap allocated state owned by `miniquake.render.world`.
rCompatLightmapBuildersTracks the module-level r compat lightmap builders state owned by `miniquake.render.world`.
rCompatLightmapModifiedTracks the module-level r compat lightmap modified state owned by `miniquake.render.world`.
rCompatLightmapRectChangeTracks the module-level r compat lightmap rect change state owned by `miniquake.render.world`.
rCompatLightmapScratchTracks the module-level r compat lightmap scratch state owned by `miniquake.render.world`.
rCompatLightPlaneTracks the module-level r compat light plane state owned by `miniquake.render.world`.
rCompatLightSpotTracks the module-level r compat light spot state owned by `miniquake.render.world`.
rCompatLightStylesTracks the module-level r compat light styles state owned by `miniquake.render.world`.
rCompatMirrorAlphaTracks the module-level r compat mirror alpha state owned by `miniquake.render.world`.
rCompatMirrorChainTracks the module-level r compat mirror chain state owned by `miniquake.render.world`.
rCompatMirrorTextureTracks the module-level r compat mirror texture state owned by `miniquake.render.world`.
rCompatMtexRecordCountTracks the module-level r compat mtex record count state owned by `miniquake.render.world`.
rCompatMtexRecordFacesTracks the module-level r compat mtex record faces state owned by `miniquake.render.world`.
rCompatMtexRecordsTracks the module-level r compat mtex records state owned by `miniquake.render.world`.
rCompatMtexRecordStampTracks the module-level r compat mtex record stamp state owned by `miniquake.render.world`.
rCompatMtexTextureCheckedTracks the module-level r compat mtex texture checked state owned by `miniquake.render.world`.
rCompatMtexTextureIdsTracks the module-level r compat mtex texture ids state owned by `miniquake.render.world`.
rCompatMultiTextureAvailableTracks the module-level r compat multi texture available state owned by `miniquake.render.world`.
rCompatMultiTextureEnabledTracks the module-level r compat multi texture enabled state owned by `miniquake.render.world`.
rCompatNoRefreshTracks the module-level r compat no refresh state owned by `miniquake.render.world`.
rCompatNoVisTracks the module-level r compat no vis state owned by `miniquake.render.world`.
rCompatRealtimeTracks the module-level r compat realtime state owned by `miniquake.render.world`.
rCompatRendererTracks the module-level r compat renderer state owned by `miniquake.render.world`.
rCompatSequentialBuilderTracks the module-level r compat sequential builder state owned by `miniquake.render.world`.
rCompatSequentialSurfacesTracks the module-level r compat sequential surfaces state owned by `miniquake.render.world`.
rCompatSkyChainTracks the module-level r compat sky chain state owned by `miniquake.render.world`.
rCompatSkyTextureTracks the module-level r compat sky texture state owned by `miniquake.render.world`.
rCompatSurfaceBatchKeysTracks the module-level r compat surface batch keys state owned by `miniquake.render.world`.
rCompatSurfaceCachedDlightTracks the module-level r compat surface cached dlight state owned by `miniquake.render.world`.
rCompatSurfaceCachedLightTracks the module-level r compat surface cached light state owned by `miniquake.render.world`.
rCompatSurfaceDlightBitsTracks the module-level r compat surface dlight bits state owned by `miniquake.render.world`.
rCompatSurfaceDlightFrameTracks the module-level r compat surface dlight frame state owned by `miniquake.render.world`.
rCompatSurfaceLightmapPageTracks the module-level r compat surface lightmap page state owned by `miniquake.render.world`.
rCompatSurfaceLightSTracks the module-level r compat surface light s state owned by `miniquake.render.world`.
rCompatSurfaceLightTTracks the module-level r compat surface light t state owned by `miniquake.render.world`.
rCompatSurfaceWarpPolysTracks the module-level r compat surface warp polys state owned by `miniquake.render.world`.
rCompatTextureChainBuildersTracks the module-level r compat texture chain builders state owned by `miniquake.render.world`.
rCompatTextureChainsTracks the module-level r compat texture chains state owned by `miniquake.render.world`.
rCompatTextureSortTracks the module-level r compat texture sort state owned by `miniquake.render.world`.
rCompatTimeTracks the module-level r compat time state owned by `miniquake.render.world`.
rCompatTrickFrameTracks the module-level r compat trick frame state owned by `miniquake.render.world`.
rCompatUseMultitextureTracks the module-level r compat use multitexture state owned by `miniquake.render.world`.
rCompatViewAnglesTracks the module-level r compat view angles state owned by `miniquake.render.world`.
rCompatViewForwardTracks the module-level r compat view forward state owned by `miniquake.render.world`.
rCompatViewOriginTracks the module-level r compat view origin state owned by `miniquake.render.world`.
rCompatViewRightTracks the module-level r compat view right state owned by `miniquake.render.world`.
rCompatViewUpTracks the module-level r compat view up state owned by `miniquake.render.world`.
rCompatVisibleNodeRendererR_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.
rCompatVisibleNodesTracks the module-level r compat visible nodes state owned by `miniquake.render.world`.
rCompatWarpPolysTracks the module-level r compat warp polys state owned by `miniquake.render.world`.
rCompatWaterChainTracks the module-level r compat water chain state owned by `miniquake.render.world`.
rCompatZTrickTracks the module-level r compat z trick state owned by `miniquake.render.world`.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function RecursiveLightPoint(nodeNumber, start, finish)Implements the `RecursiveLightPoint` operation for `miniquake.render.world` (recursive light point).
| Parameter | Type | Default | Description |
|---|---|---|---|
nodeNumber | dynamic | — | The node number input consumed by `RecursiveLightPoint`. |
start | dynamic | — | The start input consumed by `RecursiveLightPoint`. |
finish | dynamic | — | The finish input consumed by `RecursiveLightPoint`. |
function render(renderer, width, height, origin, angles)Implements the `render` operation for `miniquake.render.world` (render).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
viewRect | dynamic | — | The view rect input consumed by `renderMirrorViewport`. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
dynamicLights | dynamic | — | The dynamic lights input consumed by `renderMirrorViewport`. |
lightStyles | dynamic | — | The light styles input consumed by `renderMirrorViewport`. |
currentTime | dynamic | — | Time value used by the operation. |
realtime | dynamic | — | Time value used by the operation. |
frameTime | dynamic | — | Time value used by the operation. |
blend | dynamic | — | The blend input consumed by `renderMirrorViewport`. |
function renderViewport(renderer, width, height, viewRect, origin, angles, dynamicLights, lightStyles, currentTime, realtime, frameTime, blend)Render viewport.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
viewRect | dynamic | — | The view rect input consumed by `renderViewport`. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
dynamicLights | dynamic | — | The dynamic lights input consumed by `renderViewport`. |
lightStyles | dynamic | — | The light styles input consumed by `renderViewport`. |
currentTime | dynamic | — | Time value used by the operation. |
realtime | dynamic | — | Time value used by the operation. |
frameTime | dynamic | — | Time value used by the operation. |
blend | dynamic | — | The blend input consumed by `renderViewport`. |
function setupView(width, height, origin, angles)Update module state for up view.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
function setupViewRect(viewX, viewY, width, height, screenWidth, screenHeight, fovX, fovY, origin, angles)Update module state for up view rect.
| Parameter | Type | Default | Description |
|---|---|---|---|
viewX | dynamic | — | The view x input consumed by `setupViewRect`. |
viewY | dynamic | — | The view y input consumed by `setupViewRect`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
screenWidth | dynamic | — | The screen width input consumed by `setupViewRect`. |
screenHeight | dynamic | — | The screen height input consumed by `setupViewRect`. |
fovX | dynamic | — | The fov x input consumed by `setupViewRect`. |
fovY | dynamic | — | The fov y input consumed by `setupViewRect`. |
origin | dynamic | — | World-space origin of the operation. |
angles | dynamic | — | Orientation angles used by the operation. |
skychainTracks the module-level skychain state owned by `miniquake.render.world`.
skytexturenumOriginal MiniQuake globals retained under their public names.
solidskytextureTracks the module-level solidskytexture state owned by `miniquake.render.world`.
speedscaleTracks the module-level speedscale state owned by `miniquake.render.world`.
function standaloneModelOrigin(viewOrigin, entity)Return standalone model origin derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
viewOrigin | dynamic | — | The view origin input consumed by `standaloneModelOrigin`. |
entity | dynamic | — | Entity affected by the operation. |
function standaloneSurfaceFacesViewer(surface, distance)Implements the `standaloneSurfaceFacesViewer` operation for `miniquake.render.world` (standalone surface faces viewer).
| Parameter | Type | Default | Description |
|---|---|---|---|
surface | dynamic | — | The surface input consumed by `standaloneSurfaceFacesViewer`. |
distance | dynamic | — | The distance input consumed by `standaloneSurfaceFacesViewer`. |
function standaloneTextureId(renderer, surface, currentTime, alternate)Implements the `standaloneTextureId` operation for `miniquake.render.world` (standalone texture id).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `standaloneTextureId`. |
currentTime | dynamic | — | Time value used by the operation. |
alternate | dynamic | — | The alternate input consumed by `standaloneTextureId`. |
function startsWith(text, prefix)Starts s with for `miniquake.render.world`.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
prefix | dynamic | — | The prefix input consumed by `startsWith`. |
function SubdividePolygon(numverts, vertices)Implements the `SubdividePolygon` operation for `miniquake.render.world` (subdivide polygon).
| Parameter | Type | Default | Description |
|---|---|---|---|
numverts | dynamic | — | The numverts input consumed by `SubdividePolygon`. |
vertices | dynamic | — | The vertices input consumed by `SubdividePolygon`. |
function textureFlags(textureName, faceSide)Implements the `textureFlags` operation for `miniquake.render.world` (texture flags).
| Parameter | Type | Default | Description |
|---|---|---|---|
textureName | dynamic | — | Name that identifies the requested value or resource. |
faceSide | dynamic | — | The face side input consumed by `textureFlags`. |
function textureIdForSurface(renderer, surface)Implements the `textureIdForSurface` operation for `miniquake.render.world` (texture id for surface).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
surface | dynamic | — | The surface input consumed by `textureIdForSurface`. |
function upload(renderer)Upload the requested value to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function uploadPixels(width, height, rgba, nearest)Upload pixels to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
rgba | dynamic | — | The rgba input consumed by `uploadPixels`. |
nearest | dynamic | — | The nearest input consumed by `uploadPixels`. |
function uploadStandaloneBrush(renderer)Upload standalone brush to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function ViewContents(renderer, viewOrigin)R_SetupFrame assigns r_viewleaf from the final (possibly chase-adjusted) r_refdef.vieworg before it selects the contents cshift.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
viewOrigin | dynamic | — | The view origin input consumed by `ViewContents`. |
visibleFaceCountLeafTracks the module-level visible face count leaf state owned by `miniquake.render.world`.
visibleFaceCountRendererTracks the module-level visible face count renderer state owned by `miniquake.render.world`.
visibleFaceCountValueTracks the module-level visible face count value state owned by `miniquake.render.world`.
waterchainTracks the module-level waterchain state owned by `miniquake.render.world`.
worldSurfaceRootsThe 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.