MiniDoom

src/r_gl.ml

Renders Doom maps as cached OpenGL wall/flat geometry with dynamic sectors, masked surfaces, sprites, skies, and lights.

Package
(global)
Reachable
Yes

Imports

Declarations

RGL_AddCachedDepthConvexFloat

function RGL_AddCachedDepthConvexFloat(xs, ys, count, z)

Fan-triangulates a convex portal polygon into the depth-only cache.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_AddCachedDepthConvexFloat`.
ysdynamic—Ys value supplied to `RGL_AddCachedDepthConvexFloat`.
countdynamic—Number of elements or iterations to process.
zdynamic—Vertical world-space coordinate.

View source

RGL_AddCachedDepthQuad

function RGL_AddCachedDepthQuad(x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, z3)

Appends one four-vertex sky-occlusion surface to the depth-only cache.

ParameterTypeDefaultDescription
x0dynamic—X0 value supplied to `RGL_AddCachedDepthQuad`.
y0dynamic—Y0 value supplied to `RGL_AddCachedDepthQuad`.
z0dynamic—Z0 value supplied to `RGL_AddCachedDepthQuad`.
x1dynamic—Horizontal coordinate of the first endpoint.
y1dynamic—Vertical coordinate of the first endpoint.
z1dynamic—Z1 value supplied to `RGL_AddCachedDepthQuad`.
x2dynamic—Horizontal coordinate of the second endpoint.
y2dynamic—Vertical coordinate of the second endpoint.
z2dynamic—Z2 value supplied to `RGL_AddCachedDepthQuad`.
x3dynamic—X3 value supplied to `RGL_AddCachedDepthQuad`.
y3dynamic—Y3 value supplied to `RGL_AddCachedDepthQuad`.
z3dynamic—Z3 value supplied to `RGL_AddCachedDepthQuad`.

View source

RGL_AddCachedFlatConvexFloat

function RGL_AddCachedFlatConvexFloat(xs, ys, count, z, flatnum)

Fan-triangulates a validated convex polygon and appends lit, textured floor/ceiling triangles to the flat cache.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_AddCachedFlatConvexFloat`.
ysdynamic—Ys value supplied to `RGL_AddCachedFlatConvexFloat`.
countdynamic—Number of elements or iterations to process.
zdynamic—Vertical world-space coordinate.
flatnumdynamic—Index identifying flat.

View source

RGL_AddCachedWallQuad

function RGL_AddCachedWallQuad(v1, v2, z0, z1, texnum, side, transparent, texturemid, wallOffset)

Converts a wall span to a lit textured quad, preserving its BSP-seg texture origin, and appends it to the active wall, masked, or sky-boundary cache.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_AddCachedWallQuad`.
v2dynamic—V2 value supplied to `RGL_AddCachedWallQuad`.
z0dynamic—Z0 value supplied to `RGL_AddCachedWallQuad`.
z1dynamic—Z1 value supplied to `RGL_AddCachedWallQuad`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
transparentdynamic—Transparent value supplied to `RGL_AddCachedWallQuad`.
texturemiddynamic—Texturemid value supplied to `RGL_AddCachedWallQuad`.
wallOffsetdynamic—Wall offset value supplied to `RGL_AddCachedWallQuad`.

View source

RGL_AddDynamicLight

function RGL_AddDynamicLight(x, y, z, r, g, b, radius, strength)

Appends an in-range, positive dynamic light to the bounded per-frame arrays when near the current view.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.
rdynamic—R value supplied to `RGL_AddDynamicLight`.
gdynamic—G value supplied to `RGL_AddDynamicLight`.
bdynamic—Second input operand.
radiusdynamic—Radius value supplied to `RGL_AddDynamicLight`.
strengthdynamic—Strength value supplied to `RGL_AddDynamicLight`.

View source

RGL_AddLiquidSectorLights

function RGL_AddLiquidSectorLights(player)

Adds a small budget of ambient lights for nearby liquid sectors.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

RGL_AddSectorLiquidLight

function RGL_AddSectorLiquidLight(sec, kind, player, pulse)

Adds one restrained colored light above a nearby liquid sector.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_AddSectorLiquidLight`.
kinddynamic—Kind value supplied to `RGL_AddSectorLiquidLight`.
playerdynamic—Player state affected by the operation.
pulsedynamic—Pulse value supplied to `RGL_AddSectorLiquidLight`.

View source

RGL_AddVolatileFlatTemplate

function RGL_AddVolatileFlatTemplate(sidx, xs, ys, count)

Saves one already clipped volatile flat leaf for fast per-frame drawing.

ParameterTypeDefaultDescription
sidxdynamic—Sidx value supplied to `RGL_AddVolatileFlatTemplate`.
xsdynamic—Xs value supplied to `RGL_AddVolatileFlatTemplate`.
ysdynamic—Ys value supplied to `RGL_AddVolatileFlatTemplate`.
countdynamic—Number of elements or iterations to process.

View source

RGL_ANGLE_FULL

const RGL_ANGLE_FULL = 4294967296.

Defines rgl angle full for the r gl subsystem.

View source

RGL_AngleToDegrees

inline function RGL_AngleToDegrees(a)

Converts Doom's unsigned full-turn binary angle to degrees in [0,360).

ParameterTypeDefaultDescription
adynamic—First input operand.

View source

rgl_array_batch_t struct

RGL_ArrayBatchVisible

function RGL_ArrayBatchVisible(batch)

Conservatively rejects static geometry chunks outside the player view cone.

ParameterTypeDefaultDescription
batchdynamic—Batch value supplied to `RGL_ArrayBatchVisible`.

View source

RGL_BASEYCENTER

const RGL_BASEYCENTER = 100

Defines rgl baseycenter for the r gl subsystem.

View source

RGL_BeginArrayBatchDraw

function RGL_BeginArrayBatchDraw()

Enables OpenGL client-array state for prepacked world geometry batches.

View source

RGL_BeginFixedArrayScale

function RGL_BeginFixedArrayScale()

Applies fixed-point scaling for non-VBO client-array fallbacks.

View source

RGL_BindOrColor

function RGL_BindOrColor(texid)

Binds and enables a valid texture id, otherwise disables texturing so caller colors remain visible.

ParameterTypeDefaultDescription
texiddynamic—Texid value supplied to `RGL_BindOrColor`.

View source

RGL_BottomTextureOrZero

inline function RGL_BottomTextureOrZero(side)

Reads a sidedef's lower texture number, returning zero for missing data.

ParameterTypeDefaultDescription
sidedynamic—Map side affected by the operation.

View source

rgl_boundary_display_list_id

rgl_boundary_display_list_id

Tracks the mutable rgl boundary display list id value used by the r gl subsystem.

View source

rgl_boundary_quads

rgl_boundary_quads

Stores the rgl boundary quads collection used by the r gl subsystem.

View source

RGL_BspSideValueFloat

function RGL_BspSideValueFloat(x, y, node)

Computes the signed float-space half-plane value of a point against a BSP partition.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
nodedynamic—Node value supplied to `RGL_BspSideValueFloat`.

View source

RGL_BuildCurrentMapGeometryLump

function RGL_BuildCurrentMapGeometryLump()

Rebuilds the current static cache and returns its derived WAD lump name plus serialized geometry blob.

View source

RGL_BuildDynamicLights

function RGL_BuildDynamicLights(player)

Once per simulation state, collects frame mobjs and rebuilds bounded weapon, liquid, projectile, decor, and explosion lights.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

RGL_BuildDynamicLightSurfaceRecords

function RGL_BuildDynamicLightSurfaceRecords()

Packs dynamic lights for the native additive surface-light pass.

View source

RGL_BuildFlatArrayBatchRange

function RGL_BuildFlatArrayBatchRange(startIndex, endIndex)

Packs one contiguous cached flat triangle range into OpenGL client arrays.

ParameterTypeDefaultDescription
startIndexdynamic—Index identifying start.
endIndexdynamic—Index identifying end.

View source

RGL_BuildGeometryCache

function RGL_BuildGeometryCache(sigMap, sigSegs, sigLines, sigNodes, sigSubsectors, sigSectorMotion, sigSides)

Collects static boundary, depth, flat, opaque-wall, and masked geometry plus signatures for the loaded map.

ParameterTypeDefaultDescription
sigMapdynamic—Sig map value supplied to `RGL_BuildGeometryCache`.
sigSegsdynamic—Sig segs value supplied to `RGL_BuildGeometryCache`.
sigLinesdynamic—Sig lines value supplied to `RGL_BuildGeometryCache`.
sigNodesdynamic—Sig nodes value supplied to `RGL_BuildGeometryCache`.
sigSubsectorsdynamic—Sig subsectors value supplied to `RGL_BuildGeometryCache`.
sigSectorMotiondynamic—Sig sector motion value supplied to `RGL_BuildGeometryCache`.
sigSidesdynamic—Sig sides value supplied to `RGL_BuildGeometryCache`.

View source

rgl_building_cache

rgl_building_cache

Tracks whether rgl building cache is active in the r gl subsystem.

View source

RGL_BuildSpriteLightRecords

function RGL_BuildSpriteLightRecords()

Packs the full dynamic-light list once for native sprite color evaluation.

View source

RGL_BuildStaticArrayBatches

function RGL_BuildStaticArrayBatches()

Creates prepacked OpenGL client-array batches for static opaque world geometry.

View source

RGL_BuildStaticDisplayLists

function RGL_BuildStaticDisplayLists()

Builds per-texture OpenGL display lists for static opaque world geometry.

View source

RGL_BuildVolatileFlatTemplates

function RGL_BuildVolatileFlatTemplates()

Precomputes clipped BSP leaf polygons for dynamic-sector flats.

View source

RGL_BuildVolatileSectorMap

function RGL_BuildVolatileSectorMap(sigMap)

Precomputes sectors and draw lists that should remain dynamic.

ParameterTypeDefaultDescription
sigMapdynamic—Sig map value supplied to `RGL_BuildVolatileSectorMap`.

View source

RGL_BuildWallArrayBatchRange

function RGL_BuildWallArrayBatchRange(startIndex, endIndex)

Packs one contiguous cached wall quad range into OpenGL client arrays.

ParameterTypeDefaultDescription
startIndexdynamic—Index identifying start.
endIndexdynamic—Index identifying end.

View source

RGL_CACHE_BOUNDARY

const RGL_CACHE_BOUNDARY = 1

Defines rgl cache boundary for the r gl subsystem.

View source

RGL_CACHE_MASKED

const RGL_CACHE_MASKED = 3

Defines rgl cache masked for the r gl subsystem.

View source

rgl_cache_target

rgl_cache_target

Tracks the mutable rgl cache target value used by the r gl subsystem.

View source

RGL_CACHE_WALL

const RGL_CACHE_WALL = 2

Defines rgl cache wall for the r gl subsystem.

View source

RGL_CachedTexture

function RGL_CachedTexture(key, entry, transparent, repeatWrap)

Returns a keyed GL texture or uploads indexed asset pixels once with requested alpha and wrap modes.

ParameterTypeDefaultDescription
keydynamic—Input key code to process.
entrydynamic—Entry value supplied to `RGL_CachedTexture`.
transparentdynamic—Transparent value supplied to `RGL_CachedTexture`.
repeatWrapdynamic—Repeat wrap value supplied to `RGL_CachedTexture`.

View source

RGL_CAMERA_BACK_OFFSET

const RGL_CAMERA_BACK_OFFSET = 0.

Defines rgl camera back offset for the r gl subsystem.

View source

RGL_ClampByte

inline function RGL_ClampByte(v)

Clamps a numeric color component to an integer byte accepted by OpenGL color calls.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_ClipBspFlatToBoundarySegs

function RGL_ClipBspFlatToBoundarySegs(ss, xs, ys, count, outx, outy)

Trims BSP flat leaves against one-sided subsector walls so outside void space is not cached.

ParameterTypeDefaultDescription
ssdynamic—Ss value supplied to `RGL_ClipBspFlatToBoundarySegs`.
xsdynamic—Xs value supplied to `RGL_ClipBspFlatToBoundarySegs`.
ysdynamic—Ys value supplied to `RGL_ClipBspFlatToBoundarySegs`.
countdynamic—Number of elements or iterations to process.
outxdynamic—Outx value supplied to `RGL_ClipBspFlatToBoundarySegs`.
outydynamic—Outy value supplied to `RGL_ClipBspFlatToBoundarySegs`.

View source

RGL_ClipPolyToNodeSide

function RGL_ClipPolyToNodeSide(xs, ys, count, node, side, outx, outy)

Sutherland-Hodgman clips a convex polygon to one BSP-node half-plane and returns the output vertex count.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_ClipPolyToNodeSide`.
ysdynamic—Ys value supplied to `RGL_ClipPolyToNodeSide`.
countdynamic—Number of elements or iterations to process.
nodedynamic—Node value supplied to `RGL_ClipPolyToNodeSide`.
sidedynamic—Map side affected by the operation.
outxdynamic—Outx value supplied to `RGL_ClipPolyToNodeSide`.
outydynamic—Outy value supplied to `RGL_ClipPolyToNodeSide`.

View source

RGL_ClipPolyToSegFront

function RGL_ClipPolyToSegFront(xs, ys, count, sg, outx, outy)

Clips a convex flat polygon to the playable front side of one boundary seg.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_ClipPolyToSegFront`.
ysdynamic—Ys value supplied to `RGL_ClipPolyToSegFront`.
countdynamic—Number of elements or iterations to process.
sgdynamic—Sg value supplied to `RGL_ClipPolyToSegFront`.
outxdynamic—Outx value supplied to `RGL_ClipPolyToSegFront`.
outydynamic—Outy value supplied to `RGL_ClipPolyToSegFront`.

View source

RGL_CollectFrameMobjs

function RGL_CollectFrameMobjs()

Traverses sector thing lists once so lighting and sprite passes share the same frame-local object set.

View source

rgl_collecting_scrolling_geometry

rgl_collecting_scrolling_geometry

Tracks whether rgl collecting scrolling geometry is active in the r gl subsystem.

View source

rgl_collecting_volatile_flats

rgl_collecting_volatile_flats

Tracks whether rgl collecting volatile flats is active in the r gl subsystem.

View source

rgl_collecting_volatile_geometry

rgl_collecting_volatile_geometry

Tracks whether rgl collecting volatile geometry is active in the r gl subsystem.

View source

RGL_CollectScrollingGeometry

function RGL_CollectScrollingGeometry()

Resolves the current scroller texture offsets into frame-reusable quad records.

View source

RGL_CollectVolatileGeometry

function RGL_CollectVolatileGeometry()

Resolves current volatile sector heights into cached quad and triangle records without drawing them.

View source

RGL_CompileFlatDisplayListRange

function RGL_CompileFlatDisplayListRange(startIndex, endIndex)

Compiles a contiguous flat-triangle texture group into one OpenGL display list.

ParameterTypeDefaultDescription
startIndexdynamic—Index identifying start.
endIndexdynamic—Index identifying end.

View source

RGL_CompileTexturedQuadDisplayList

function RGL_CompileTexturedQuadDisplayList(quads)

Compiles static textured quad lists that still use the immediate-mode fallback path.

ParameterTypeDefaultDescription
quadsdynamic—Quads value supplied to `RGL_CompileTexturedQuadDisplayList`.

View source

RGL_CompileWallDisplayListRange

function RGL_CompileWallDisplayListRange(startIndex, endIndex)

Compiles a contiguous wall-quad texture group into one OpenGL display list.

ParameterTypeDefaultDescription
startIndexdynamic—Index identifying start.
endIndexdynamic—Index identifying end.

View source

RGL_CreateArrayBufferOrZero

function RGL_CreateArrayBufferOrZero(data)

Uploads static geometry bytes to a VBO when the helper and driver support it.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.

View source

RGL_CreateInterleavedGeomBufferOrZero

function RGL_CreateInterleavedGeomBufferOrZero(data)

Uploads fixed-point interleaved geometry as a float VBO through the GL helper.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.

View source

RGL_CrossFixed

inline function RGL_CrossFixed(ax, ay, bx, by, cx, cy)

Computes the signed 2D cross product of three fixed-point map coordinates in float space.

ParameterTypeDefaultDescription
axdynamic—Horizontal coordinate or vector component represented by ax.
aydynamic—Vertical coordinate or vector component represented by ay.
bxdynamic—Horizontal coordinate or vector component represented by bx.
bydynamic—Vertical coordinate or vector component represented by by.
cxdynamic—Horizontal coordinate or vector component represented by cx.
cydynamic—Vertical coordinate or vector component represented by cy.

View source

rgl_current_light

rgl_current_light

Tracks the mutable rgl current light value used by the r gl subsystem.

View source

RGL_CurrentMapIdentity

inline function RGL_CurrentMapIdentity()

Distinguishes episode maps that share the same map number while preserving commercial map IDs.

View source

RGL_DefaultTextureMid

function RGL_DefaultTextureMid(z1, side)

Uses a wall span's top plus sidedef row offset as the default vertical texture origin.

ParameterTypeDefaultDescription
z1dynamic—Z1 value supplied to `RGL_DefaultTextureMid`.
sidedynamic—Map side affected by the operation.

View source

RGL_DeleteArrayBatchBuffers

function RGL_DeleteArrayBatchBuffers(batches)

Releases every VBO owned by an array-batch collection.

ParameterTypeDefaultDescription
batchesdynamic—Batches value supplied to `RGL_DeleteArrayBatchBuffers`.

View source

RGL_DeleteStaticDisplayLists

function RGL_DeleteStaticDisplayLists()

Releases compiled OpenGL display lists for static wall and flat batches.

View source

rgl_depth_quad_t struct

rgl_depth_quads

rgl_depth_quads

Stores the rgl depth quads collection used by the r gl subsystem.

View source

rgl_depth_tri_t struct

rgl_depth_tris

rgl_depth_tris

Stores the rgl depth tris collection used by the r gl subsystem.

View source

RGL_DisableCutoutAlpha

function RGL_DisableCutoutAlpha()

Disables alpha testing after masked wall or sprite rendering.

View source

RGL_DrawAllBspFlats

function RGL_DrawAllBspFlats()

Builds a padded map-bounds rectangle and partitions it through the BSP to produce gap-free leaf flat polygons.

View source

RGL_DrawAllFlats

function RGL_DrawAllFlats()

Draws floor and ceiling polygons for every subsector using the owning sector's flat ids and static light.

View source

RGL_DrawAllLineMidtextures

function RGL_DrawAllLineMidtextures()

For maps without segs, emits both eligible middle-texture sides of every two-sided linedef.

View source

RGL_DrawAllMaskedWalls

function RGL_DrawAllMaskedWalls()

Traverses every seg and draws its eligible cutout middle-texture surfaces.

View source

RGL_DrawAllWalls

function RGL_DrawAllWalls()

Draws every BSP seg, falling back to linedefs when a seg table is unavailable.

View source

RGL_DrawBoundaryQuads

function RGL_DrawBoundaryQuads()

Draws cached sky boundary quads through a compiled OpenGL display list.

View source

RGL_DrawBspFlatNode

function RGL_DrawBspFlatNode(bspnum, xs, ys, count)

Recursively clips the map-bounds polygon through BSP half-planes and sends each leaf polygon to flat rendering.

ParameterTypeDefaultDescription
bspnumdynamic—Index identifying bsp.
xsdynamic—Xs value supplied to `RGL_DrawBspFlatNode`.
ysdynamic—Ys value supplied to `RGL_DrawBspFlatNode`.
countdynamic—Number of elements or iterations to process.

View source

RGL_DrawBspLeafFlat

function RGL_DrawBspLeafFlat(sidx, xs, ys, count)

Clips one BSP leaf to solid boundary segs, records volatile templates when requested, then draws floor and ceiling/sky depth.

ParameterTypeDefaultDescription
sidxdynamic—Sidx value supplied to `RGL_DrawBspLeafFlat`.
xsdynamic—Xs value supplied to `RGL_DrawBspLeafFlat`.
ysdynamic—Ys value supplied to `RGL_DrawBspLeafFlat`.
countdynamic—Number of elements or iterations to process.

View source

RGL_DrawCachedDepthGeometry

function RGL_DrawCachedDepthGeometry()

Writes cached sky-occlusion triangles and quads to depth only, restoring color and texture state afterward.

View source

RGL_DrawCachedFlatTris

function RGL_DrawCachedFlatTris()

Draws cached floor/ceiling triangles grouped by flat id to reduce texture binds and immediate-mode boundaries.

View source

RGL_DrawCachedTexturedQuads

function RGL_DrawCachedTexturedQuads(quads)

Draws cached quads in texture/alpha groups, minimizing binds and glBegin/glEnd boundaries.

ParameterTypeDefaultDescription
quadsdynamic—Quads value supplied to `RGL_DrawCachedTexturedQuads`.

View source

RGL_DrawCachedWorld

function RGL_DrawCachedWorld(player, yaw)

Draws cached boundary/depth/flats/walls, then sprites and masked batches in depth-correct world order.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
yawdynamic—Yaw value supplied to `RGL_DrawCachedWorld`.

View source

RGL_DrawDirectWorld

function RGL_DrawDirectWorld(player, yaw)

Recomputes and draws all sky boundaries, BSP flats, walls, sprites, and cutout surfaces without geometry caches.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
yawdynamic—Yaw value supplied to `RGL_DrawDirectWorld`.

View source

RGL_DrawDynamicLightGlows

function RGL_DrawDynamicLightGlows(yaw)

Adds dynamic light back onto real floor, ceiling, and wall geometry.

ParameterTypeDefaultDescription
yawdynamic—Yaw value supplied to `RGL_DrawDynamicLightGlows`.

View source

RGL_DrawFlatArrayBatches

function RGL_DrawFlatArrayBatches()

Draws static floor and ceiling geometry using OpenGL client arrays.

View source

RGL_DrawFlatConvexFloat

function RGL_DrawFlatConvexFloat(xs, ys, count, z, flatnum)

Caches or fan-draws a convex floor/ceiling polygon with repeating flat UVs and current lighting.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_DrawFlatConvexFloat`.
ysdynamic—Ys value supplied to `RGL_DrawFlatConvexFloat`.
countdynamic—Number of elements or iterations to process.
zdynamic—Vertical world-space coordinate.
flatnumdynamic—Index identifying flat.

View source

RGL_DrawFlatDisplayLists

function RGL_DrawFlatDisplayLists()

Draws static flat display-list batches with current animated flat bindings.

View source

RGL_DrawFlatPolygonEarClipped

function RGL_DrawFlatPolygonEarClipped(pxs, pys, count, zz, textured)

Triangulates and draws a simple fixed-point polygon by orientation-aware ear clipping, returning whether any ear emitted.

ParameterTypeDefaultDescription
pxsdynamic—Pxs value supplied to `RGL_DrawFlatPolygonEarClipped`.
pysdynamic—Pys value supplied to `RGL_DrawFlatPolygonEarClipped`.
countdynamic—Number of elements or iterations to process.
zzdynamic—Zz value supplied to `RGL_DrawFlatPolygonEarClipped`.
textureddynamic—Textured value supplied to `RGL_DrawFlatPolygonEarClipped`.

View source

RGL_DrawFlatTriangle

function RGL_DrawFlatTriangle(pxs, pys, a, b, c, zz, textured)

Emits one lit flat triangle with 64-unit repeating UV coordinates when texturing is active.

ParameterTypeDefaultDescription
pxsdynamic—Pxs value supplied to `RGL_DrawFlatTriangle`.
pysdynamic—Pys value supplied to `RGL_DrawFlatTriangle`.
adynamic—First input operand.
bdynamic—Second input operand.
cdynamic—C value supplied to `RGL_DrawFlatTriangle`.
zzdynamic—Zz value supplied to `RGL_DrawFlatTriangle`.
textureddynamic—Textured value supplied to `RGL_DrawFlatTriangle`.

View source

RGL_DrawLine

function RGL_DrawLine(li)

Resolves a linedef's front side and draws its opaque spans unless assigned to scrolling or volatile caches.

ParameterTypeDefaultDescription
lidynamic—Li value supplied to `RGL_DrawLine`.

View source

RGL_DrawLineSideMidtexture

function RGL_DrawLineSideMidtexture(li, sideIndex)

Resolves and draws one oriented side of a two-sided linedef's cutout middle texture.

ParameterTypeDefaultDescription
lidynamic—Li value supplied to `RGL_DrawLineSideMidtexture`.
sideIndexdynamic—Index identifying side.

View source

RGL_DrawMaskedArrayBatches

function RGL_DrawMaskedArrayBatches()

Draws static cutout walls through spatially culled VBO batches.

View source

RGL_DrawMaskedMidtexture

function RGL_DrawMaskedMidtexture(v1, v2, linedef, side, front, back, wallOffset)

Computes a two-sided middle texture's pegged bounds and draws it as an offset-preserving cutout quad.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawMaskedMidtexture`.
v2dynamic—V2 value supplied to `RGL_DrawMaskedMidtexture`.
linedefdynamic—Linedef value supplied to `RGL_DrawMaskedMidtexture`.
sidedynamic—Map side affected by the operation.
frontdynamic—Front value supplied to `RGL_DrawMaskedMidtexture`.
backdynamic—Back value supplied to `RGL_DrawMaskedMidtexture`.
wallOffsetdynamic—Wall offset value supplied to `RGL_DrawMaskedMidtexture`.

View source

RGL_DrawMaskedQuads

function RGL_DrawMaskedQuads()

Draws cached masked midtexture quads through a compiled OpenGL display list.

View source

RGL_DrawMaskedSeg

function RGL_DrawMaskedSeg(sg)

Draws cutout middle textures on each populated side of a two-sided seg using that side's sector light.

ParameterTypeDefaultDescription
sgdynamic—Sg value supplied to `RGL_DrawMaskedSeg`.

View source

RGL_DrawOneSpriteBillboard

function RGL_DrawOneSpriteBillboard(mo, lump, flip, rx, rz)

Builds one camera-facing world sprite quad, applying sector/dynamic light or a multi-pass translucent shadow treatment.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.
lumpdynamic—Lump value supplied to `RGL_DrawOneSpriteBillboard`.
flipdynamic—Flip value supplied to `RGL_DrawOneSpriteBillboard`.
rxdynamic—Rx value supplied to `RGL_DrawOneSpriteBillboard`.
rzdynamic—Rz value supplied to `RGL_DrawOneSpriteBillboard`.

View source

RGL_DrawPlayerWeapon2D

function RGL_DrawPlayerWeapon2D(player)

Resolves each active weapon/flash player sprite and submits its upscaled patch as a screen-space GL rectangle.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

RGL_DrawScrollingMaskedArrayBatches

function RGL_DrawScrollingMaskedArrayBatches()

Draws cutout scrolling-wall VBOs through native culling with an alpha-tested per-batch fallback.

View source

RGL_DrawScrollingMaskedWalls

function RGL_DrawScrollingMaskedWalls()

Draws masked portions of continuously scrolling walls outside the static cache.

View source

RGL_DrawScrollingWallArrayBatches

function RGL_DrawScrollingWallArrayBatches()

Draws opaque scrolling-wall VBOs through native culling with a per-batch client-array fallback.

View source

RGL_DrawScrollingWalls

function RGL_DrawScrollingWalls()

Draws only continuously scrolling wall pieces with their current texture offsets.

View source

RGL_DrawSeg

function RGL_DrawSeg(sg)

Draws an oriented BSP seg's opaque spans unless the seg belongs to scrolling or volatile geometry.

ParameterTypeDefaultDescription
sgdynamic—Sg value supplied to `RGL_DrawSeg`.

View source

RGL_DrawSky

function RGL_DrawSky(yaw)

Draws the classic yaw-anchored full-screen sky texture, then restores the 3D projection and depth testing.

ParameterTypeDefaultDescription
yawdynamic—Yaw value supplied to `RGL_DrawSky`.

View source

RGL_DrawSkyConvexFloat

function RGL_DrawSkyConvexFloat(xs, ys, count, z)

Fan-draws a convex polygon with the full-bright sky texture mapped by view-relative angle.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_DrawSkyConvexFloat`.
ysdynamic—Ys value supplied to `RGL_DrawSkyConvexFloat`.
countdynamic—Number of elements or iterations to process.
zdynamic—Vertical world-space coordinate.

View source

RGL_DrawSkyDepthConvexFloat

function RGL_DrawSkyDepthConvexFloat(xs, ys, count, z)

Caches or immediately fan-draws a convex sky-ceiling polygon with color writes disabled.

ParameterTypeDefaultDescription
xsdynamic—Xs value supplied to `RGL_DrawSkyDepthConvexFloat`.
ysdynamic—Ys value supplied to `RGL_DrawSkyDepthConvexFloat`.
countdynamic—Number of elements or iterations to process.
zdynamic—Vertical world-space coordinate.

View source

RGL_DrawSkyInteriorBoundaries

function RGL_DrawSkyInteriorBoundaries()

Finds segs whose adjacent sectors disagree on sky ceiling and draws their textured interior height steps.

View source

RGL_DrawSkyInteriorBoundaryLine

function RGL_DrawSkyInteriorBoundaryLine(li)

No-seg fallback that draws both oriented textured ceiling steps across a sky/non-sky linedef.

ParameterTypeDefaultDescription
lidynamic—Li value supplied to `RGL_DrawSkyInteriorBoundaryLine`.

View source

RGL_DrawSkyInteriorBoundaryLines

function RGL_DrawSkyInteriorBoundaryLines()

Traverses linedefs and draws sky/non-sky ceiling steps when BSP seg boundaries are unavailable.

View source

RGL_DrawSkyInteriorBoundarySeg

function RGL_DrawSkyInteriorBoundarySeg(sg)

Fills the ceiling-height step where a seg crosses between sky and non-sky sectors, drawing both orientations if textured.

ParameterTypeDefaultDescription
sgdynamic—Sg value supplied to `RGL_DrawSkyInteriorBoundarySeg`.

View source

RGL_DrawSkyPortals

function RGL_DrawSkyPortals()

Writes depth-only portal quads for every sky-adjacent BSP seg while preserving depth writes.

View source

RGL_DrawSkyPortalSeg

function RGL_DrawSkyPortalSeg(sg)

Adds or draws a tall depth-only quad above a sky-ceiling seg so later sky pixels respect world occlusion.

ParameterTypeDefaultDescription
sgdynamic—Sg value supplied to `RGL_DrawSkyPortalSeg`.

View source

RGL_DrawSkyVertex

function RGL_DrawSkyVertex(x, y, z)

Emits a world-space sky vertex with angular horizontal UV and centered vertical UV.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_DrawSpriteBillboards

function RGL_DrawSpriteBillboards(player, yaw)

Draws world sprites through the native batch path with an immediate-mode fallback.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
yawdynamic—Yaw value supplied to `RGL_DrawSpriteBillboards`.

View source

RGL_DrawSpriteBillboardsImmediate

function RGL_DrawSpriteBillboardsImmediate(player, yaw)

Preserves the original per-sprite immediate renderer as a compatibility fallback.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
yawdynamic—Yaw value supplied to `RGL_DrawSpriteBillboardsImmediate`.

View source

RGL_DrawSpriteBillboardsNative

function RGL_DrawSpriteBillboardsNative(player, yaw)

Culls and packs visible sprites before handing the complete frame list to the native GL helper.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
yawdynamic—Yaw value supplied to `RGL_DrawSpriteBillboardsNative`.

View source

RGL_DrawSpriteQuad

function RGL_DrawSpriteQuad(x0, y0, x1, y1, z0, z1, flip)

Draws one billboard quad using Doom sprite texture orientation.

ParameterTypeDefaultDescription
x0dynamic—X0 value supplied to `RGL_DrawSpriteQuad`.
y0dynamic—Y0 value supplied to `RGL_DrawSpriteQuad`.
x1dynamic—Horizontal coordinate of the first endpoint.
y1dynamic—Vertical coordinate of the first endpoint.
z0dynamic—Z0 value supplied to `RGL_DrawSpriteQuad`.
z1dynamic—Z1 value supplied to `RGL_DrawSpriteQuad`.
flipdynamic—Flip value supplied to `RGL_DrawSpriteQuad`.

View source

RGL_DrawStaticArrayBatch

function RGL_DrawStaticArrayBatch(batch, mode)

Draws one prepacked OpenGL client-array geometry batch.

ParameterTypeDefaultDescription
batchdynamic—Batch value supplied to `RGL_DrawStaticArrayBatch`.
modedynamic—Mode value supplied to `RGL_DrawStaticArrayBatch`.

View source

RGL_DrawStaticWorldDisplayList

function RGL_DrawStaticWorldDisplayList()

Draws all static opaque wall and flat geometry through one parent OpenGL display list.

View source

RGL_DrawSubsectorFlat

function RGL_DrawSubsectorFlat(ss, z, flatnum)

Reconstructs a subsector polygon from unique seg endpoints, angle-sorts it, and draws an ear-clipped or fan flat.

ParameterTypeDefaultDescription
ssdynamic—Ss value supplied to `RGL_DrawSubsectorFlat`.
zdynamic—Vertical world-space coordinate.
flatnumdynamic—Index identifying flat.

View source

RGL_DrawVolatileFlatArrayBatches

function RGL_DrawVolatileFlatArrayBatches()

Draws moving-sector floors and ceilings through native culled VBO batches.

View source

RGL_DrawVolatileFlats

function RGL_DrawVolatileFlats()

Draws only flats that belong to dynamic sector geometry.

View source

RGL_DrawVolatileFlatTemplate

function RGL_DrawVolatileFlatTemplate(t)

Draws one cached dynamic-sector floor and ceiling polygon at current heights.

ParameterTypeDefaultDescription
tdynamic—T value supplied to `RGL_DrawVolatileFlatTemplate`.

View source

RGL_DrawVolatileLineMidtextures

function RGL_DrawVolatileLineMidtextures()

Draws dynamic line midtextures when no seg list is available.

View source

RGL_DrawVolatileMaskedArrayBatches

function RGL_DrawVolatileMaskedArrayBatches()

Draws settled moving-sector cutout walls from their cached VBOs.

View source

RGL_DrawVolatileMaskedWalls

function RGL_DrawVolatileMaskedWalls()

Draws only masked wall pieces that touch dynamic sector geometry.

View source

RGL_DrawVolatileMaskedWorld

function RGL_DrawVolatileMaskedWorld()

Updates dynamic masked geometry on top of the static cache.

View source

RGL_DrawVolatileOpaqueWorld

function RGL_DrawVolatileOpaqueWorld()

Updates dynamic sector flats and opaque walls on top of the static cache.

View source

RGL_DrawVolatileWallArrayBatches

function RGL_DrawVolatileWallArrayBatches()

Draws moving-sector walls through native culled VBO batches.

View source

RGL_DrawVolatileWalls

function RGL_DrawVolatileWalls()

Draws only opaque wall pieces that touch dynamic sector geometry.

View source

RGL_DrawWallArrayBatches

function RGL_DrawWallArrayBatches()

Draws static wall geometry using OpenGL client arrays.

View source

RGL_DrawWallDisplayLists

function RGL_DrawWallDisplayLists()

Draws static wall display-list batches with current animated texture bindings.

View source

RGL_DrawWallPiece

function RGL_DrawWallPiece(v1, v2, linedef, side, front, back, wallOffset)

Draws a one-sided middle wall or adjacent-sector steps with pegging, light, and the parent linedef's continuous horizontal UV origin.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawWallPiece`.
v2dynamic—V2 value supplied to `RGL_DrawWallPiece`.
linedefdynamic—Linedef value supplied to `RGL_DrawWallPiece`.
sidedynamic—Map side affected by the operation.
frontdynamic—Front value supplied to `RGL_DrawWallPiece`.
backdynamic—Back value supplied to `RGL_DrawWallPiece`.
wallOffsetdynamic—Wall offset value supplied to `RGL_DrawWallPiece`.

View source

RGL_DrawWallQuad

function RGL_DrawWallQuad(v1, v2, z0, z1, texnum, side)

Draws an opaque wall span through the common quad path.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawWallQuad`.
v2dynamic—V2 value supplied to `RGL_DrawWallQuad`.
z0dynamic—Z0 value supplied to `RGL_DrawWallQuad`.
z1dynamic—Z1 value supplied to `RGL_DrawWallQuad`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.

View source

RGL_DrawWallQuadEx

function RGL_DrawWallQuadEx(v1, v2, z0, z1, texnum, side, transparent)

Draws an opaque or cutout wall span using the default top-plus-row-offset texture origin.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawWallQuadEx`.
v2dynamic—V2 value supplied to `RGL_DrawWallQuadEx`.
z0dynamic—Z0 value supplied to `RGL_DrawWallQuadEx`.
z1dynamic—Z1 value supplied to `RGL_DrawWallQuadEx`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
transparentdynamic—Transparent value supplied to `RGL_DrawWallQuadEx`.

View source

RGL_DrawWallQuadOffset

function RGL_DrawWallQuadOffset(v1, v2, z0, z1, texnum, side, wallOffset)

Draws a generic wall quad while adding an oriented BSP-seg distance to the sidedef texture offset.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawWallQuadOffset`.
v2dynamic—V2 value supplied to `RGL_DrawWallQuadOffset`.
z0dynamic—Z0 value supplied to `RGL_DrawWallQuadOffset`.
z1dynamic—Z1 value supplied to `RGL_DrawWallQuadOffset`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
wallOffsetdynamic—Wall offset value supplied to `RGL_DrawWallQuadOffset`.

View source

RGL_DrawWallQuadTexMid

function RGL_DrawWallQuadTexMid(v1, v2, z0, z1, texnum, side, transparent, texturemid, wallOffset)

Caches or immediately draws a wall span with its sidedef-plus-seg horizontal origin and an explicit vertical texture origin.

ParameterTypeDefaultDescription
v1dynamic—V1 value supplied to `RGL_DrawWallQuadTexMid`.
v2dynamic—V2 value supplied to `RGL_DrawWallQuadTexMid`.
z0dynamic—Z0 value supplied to `RGL_DrawWallQuadTexMid`.
z1dynamic—Z1 value supplied to `RGL_DrawWallQuadTexMid`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
transparentdynamic—Transparent value supplied to `RGL_DrawWallQuadTexMid`.
texturemiddynamic—Texturemid value supplied to `RGL_DrawWallQuadTexMid`.
wallOffsetdynamic—Wall offset value supplied to `RGL_DrawWallQuadTexMid`.

View source

rgl_dyn_light_b

rgl_dyn_light_b

Stores the rgl dyn light b collection used by the r gl subsystem.

View source

rgl_dyn_light_count

rgl_dyn_light_count

Tracks the mutable rgl dyn light count value used by the r gl subsystem.

View source

rgl_dyn_light_g

rgl_dyn_light_g

Stores the rgl dyn light g collection used by the r gl subsystem.

View source

rgl_dyn_light_last_gametic

rgl_dyn_light_last_gametic

Tracks the mutable rgl dyn light last gametic value used by the r gl subsystem.

View source

rgl_dyn_light_last_leveltime

rgl_dyn_light_last_leveltime

Tracks the mutable rgl dyn light last leveltime value used by the r gl subsystem.

View source

rgl_dyn_light_last_map

rgl_dyn_light_last_map

Tracks the mutable rgl dyn light last map value used by the r gl subsystem.

View source

rgl_dyn_light_r

rgl_dyn_light_r

Stores the rgl dyn light r collection used by the r gl subsystem.

View source

rgl_dyn_light_radius

rgl_dyn_light_radius

Stores the rgl dyn light radius collection used by the r gl subsystem.

View source

rgl_dyn_light_revision

rgl_dyn_light_revision

Tracks the mutable rgl dyn light revision value used by the r gl subsystem.

View source

rgl_dyn_light_strength

rgl_dyn_light_strength

Stores the rgl dyn light strength collection used by the r gl subsystem.

View source

rgl_dyn_light_x

rgl_dyn_light_x

Stores the rgl dyn light x collection used by the r gl subsystem.

View source

rgl_dyn_light_y

rgl_dyn_light_y

Stores the rgl dyn light y collection used by the r gl subsystem.

View source

rgl_dyn_light_z

rgl_dyn_light_z

Stores the rgl dyn light z collection used by the r gl subsystem.

View source

RGL_DYNAMIC_SETTLE_FRAMES

const RGL_DYNAMIC_SETTLE_FRAMES = 3

Defines rgl dynamic settle frames for the r gl subsystem.

View source

RGL_EnableCutoutAlpha

function RGL_EnableCutoutAlpha()

Enables alpha testing and rejects texels whose alpha does not exceed the 0.5 cutout threshold.

View source

RGL_EndArrayBatchDraw

function RGL_EndArrayBatchDraw()

Restores OpenGL client-array state after array batch rendering.

View source

RGL_EndFixedArrayScale

function RGL_EndFixedArrayScale()

Restores matrices after non-VBO fixed-point fallback drawing.

View source

RGL_EnsureGeometryCache

function RGL_EnsureGeometryCache()

Reuses matching geometry, tries the map lump on first use, or rebuilds and serializes when topology/sidedefs differ.

View source

RGL_EnsureScrollingArrayBatches

function RGL_EnsureScrollingArrayBatches()

Refreshes scrolling UV geometry once per game tic, not once per rendered frame.

View source

RGL_EnsureVolatileArrayBatches

function RGL_EnsureVolatileArrayBatches()

Rebuilds volatile meshes at most once per game tic and only when their state changed.

View source

RGL_EnsureVolatileSectorMap

function RGL_EnsureVolatileSectorMap(sigMap)

Keeps the dynamic sector draw lists aligned with the loaded map.

ParameterTypeDefaultDescription
sigMapdynamic—Sig map value supplied to `RGL_EnsureVolatileSectorMap`.

View source

RGL_EnumIndex

inline function RGL_EnumIndex(v, limit)

Resolves an enum-like value to a bounded numeric table index, returning -1 when absent.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.
limitdynamic—Limit value supplied to `RGL_EnumIndex`.

View source

RGL_FallbackStepTexture

function RGL_FallbackStepTexture(tex, side, otherSide)

Chooses a nonzero step texture from the requested slot, opposite side tiers, then either middle texture.

ParameterTypeDefaultDescription
texdynamic—Texture identifier or texture data to process.
sidedynamic—Map side affected by the operation.
otherSidedynamic—Other side value supplied to `RGL_FallbackStepTexture`.

View source

RGL_FF_FRAMEMASK

const RGL_FF_FRAMEMASK = 32767

Defines rgl ff framemask for the r gl subsystem.

View source

RGL_FixedToFloat

inline function RGL_FixedToFloat(v)

Converts a Doom FRACUNIT-scaled coordinate to floating-point world units.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_FLAT_ARRAY_BATCH_TRIS

const RGL_FLAT_ARRAY_BATCH_TRIS = 8192

Defines rgl flat array batch tris for the r gl subsystem.

View source

rgl_flat_array_batches

rgl_flat_array_batches

Stores the rgl flat array batches collection used by the r gl subsystem.

View source

rgl_flat_display_list_flatnums

rgl_flat_display_list_flatnums

Stores the rgl flat display list flatnums collection used by the r gl subsystem.

View source

rgl_flat_display_list_ids

rgl_flat_display_list_ids

Stores the rgl flat display list ids collection used by the r gl subsystem.

View source

rgl_flat_native_record_count

rgl_flat_native_record_count

Tracks the mutable rgl flat native record count value used by the r gl subsystem.

View source

rgl_flat_native_records

rgl_flat_native_records

Tracks the mutable rgl flat native records value used by the r gl subsystem.

View source

rgl_flat_native_texture_revision

rgl_flat_native_texture_revision

Tracks the mutable rgl flat native texture revision value used by the r gl subsystem.

View source

RGL_FLAT_SPATIAL_BATCH_CELL

const RGL_FLAT_SPATIAL_BATCH_CELL = 4096.

Defines rgl flat spatial batch cell for the r gl subsystem.

View source

rgl_flat_tex_ids

rgl_flat_tex_ids

Stores the rgl flat tex ids collection used by the r gl subsystem.

View source

rgl_flat_tri_t struct

rgl_flat_tris

rgl_flat_tris

Stores the rgl flat tris collection used by the r gl subsystem.

View source

rgl_flat_volatile_only

rgl_flat_volatile_only

Tracks whether rgl flat volatile only is active in the r gl subsystem.

View source

RGL_FlatArrayBatchKey

function RGL_FlatArrayBatchKey(t)

Builds a combined texture and spatial key for static flat batching.

ParameterTypeDefaultDescription
tdynamic—T value supplied to `RGL_FlatArrayBatchKey`.

View source

RGL_FlatNameForNum

function RGL_FlatNameForNum(flatnum)

Resolves the currently translated flat name for liquid light classification.

ParameterTypeDefaultDescription
flatnumdynamic—Index identifying flat.

View source

RGL_FlatSpatialBatchCellKey

function RGL_FlatSpatialBatchCellKey(x, z)

Maps flat geometry to coarser cells because flat rendering is draw-call bound.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_FloatToGeom

inline function RGL_FloatToGeom(v)

Quantizes a numeric coordinate to the signed fixed-scale representation used in cached geometry.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

rgl_force_software

rgl_force_software

Tracks whether rgl force software is active in the r gl subsystem.

View source

rgl_frame_mobj_count

rgl_frame_mobj_count

Tracks the mutable rgl frame mobj count value used by the r gl subsystem.

View source

rgl_frame_mobjs

rgl_frame_mobjs

Stores the rgl frame mobjs collection used by the r gl subsystem.

View source

RGL_GEOM_FIX_SCALE

const RGL_GEOM_FIX_SCALE = 65536.

Defines rgl geom fix scale for the r gl subsystem.

View source

rgl_geom_ready

rgl_geom_ready

Tracks whether rgl geom ready is active in the r gl subsystem.

View source

rgl_geom_sig_lines

rgl_geom_sig_lines

Tracks the mutable rgl geom sig lines value used by the r gl subsystem.

View source

rgl_geom_sig_map

rgl_geom_sig_map

Tracks the mutable rgl geom sig map value used by the r gl subsystem.

View source

rgl_geom_sig_nodes

rgl_geom_sig_nodes

Tracks the mutable rgl geom sig nodes value used by the r gl subsystem.

View source

rgl_geom_sig_sector_motion

rgl_geom_sig_sector_motion

Tracks the mutable rgl geom sig sector motion value used by the r gl subsystem.

View source

rgl_geom_sig_segs

rgl_geom_sig_segs

Tracks the mutable rgl geom sig segs value used by the r gl subsystem.

View source

rgl_geom_sig_sides

rgl_geom_sig_sides

Tracks the mutable rgl geom sig sides value used by the r gl subsystem.

View source

rgl_geom_sig_subsectors

rgl_geom_sig_subsectors

Tracks the mutable rgl geom sig subsectors value used by the r gl subsystem.

View source

RGL_GEOM_VERSION

const RGL_GEOM_VERSION = 9

Defines rgl geom version for the r gl subsystem.

View source

RGL_GeometryCacheByteSize

function RGL_GeometryCacheByteSize()

Computes the exact serialized byte count for the cache header and all quad/triangle record collections.

View source

RGL_GeomToFloat

inline function RGL_GeomToFloat(v)

Restores a serialized fixed-scale geometry component to floating-point world units.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_GroupCachedFlatTrisByTexture

function RGL_GroupCachedFlatTrisByTexture(tris)

Groups cached flat triangles by flat texture once so immediate-mode batches are larger.

ParameterTypeDefaultDescription
trisdynamic—Tris value supplied to `RGL_GroupCachedFlatTrisByTexture`.

View source

RGL_GroupCachedQuadsByTexture

function RGL_GroupCachedQuadsByTexture(quads)

Groups opaque cached quads by texture once so immediate-mode batches are larger.

ParameterTypeDefaultDescription
quadsdynamic—Quads value supplied to `RGL_GroupCachedQuadsByTexture`.

View source

RGL_GroupFlatTrisForArrayBatches

function RGL_GroupFlatTrisForArrayBatches(tris)

Groups cached flat triangles by texture and coarse spatial cell for fewer visible draw calls.

ParameterTypeDefaultDescription
trisdynamic—Tris value supplied to `RGL_GroupFlatTrisForArrayBatches`.

View source

RGL_GroupOpaqueGeometryForBatches

function RGL_GroupOpaqueGeometryForBatches()

Prepares static opaque world lists for larger OpenGL immediate-mode batches.

View source

RGL_GroupWallQuadsForArrayBatches

function RGL_GroupWallQuadsForArrayBatches(quads)

Groups cached wall quads by texture and coarse spatial cell for fewer visible draw calls.

ParameterTypeDefaultDescription
quadsdynamic—Quads value supplied to `RGL_GroupWallQuadsForArrayBatches`.

View source

RGL_HasActiveSectorMotion

function RGL_HasActiveSectorMotion()

Checks whether a sector thinker is currently moving world geometry.

View source

RGL_IsNumber

inline function RGL_IsNumber(v)

Checks numeric values before packing cached OpenGL geometry.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_IsSeq

inline function RGL_IsSeq(v)

Recognizes the array and list containers accepted by renderer geometry and map tables.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_IsValidFlatTri

inline function RGL_IsValidFlatTri(t)

Rejects malformed cached flat triangles before array batching.

ParameterTypeDefaultDescription
tdynamic—T value supplied to `RGL_IsValidFlatTri`.

View source

RGL_IsVolatileLineIndex

function RGL_IsVolatileLineIndex(idx)

Checks whether a line touches dynamic sector geometry.

ParameterTypeDefaultDescription
idxdynamic—Zero-based element or table index.

View source

RGL_IsVolatileSector

function RGL_IsVolatileSector(sec)

Returns true for sectors that may move or need uncached wall/flat updates.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_IsVolatileSector`.

View source

RGL_IsVolatileSegIndex

function RGL_IsVolatileSegIndex(idx)

Checks whether a seg touches dynamic sector geometry.

ParameterTypeDefaultDescription
idxdynamic—Zero-based element or table index.

View source

RGL_IsVolatileSubsectorIndex

function RGL_IsVolatileSubsectorIndex(idx)

Checks whether a subsector belongs to dynamic sector geometry.

ParameterTypeDefaultDescription
idxdynamic—Zero-based element or table index.

View source

rgl_light_geom_blob

rgl_light_geom_blob

Tracks the mutable rgl light geom blob value used by the r gl subsystem.

View source

RGL_LIGHT_RECORD_SIZE

const RGL_LIGHT_RECORD_SIZE = 32

Defines rgl light record size for the r gl subsystem.

View source

RGL_LightByte

inline function RGL_LightByte(sec)

Maps a sector light level into the renderer's restrained 12-through-198 static brightness range.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_LightByte`.

View source

RGL_LineMayMoveGeometry

function RGL_LineMayMoveGeometry(li)

Returns true for Doom line specials that start, resume, or stop moving floors, ceilings, doors, or platforms.

ParameterTypeDefaultDescription
lidynamic—Li value supplied to `RGL_LineMayMoveGeometry`.

View source

RGL_LineScrollsTexture

inline function RGL_LineScrollsTexture(li)

Identifies Doom's continuously scrolling wall special so it can bypass static UV caches.

ParameterTypeDefaultDescription
lidynamic—Li value supplied to `RGL_LineScrollsTexture`.

View source

RGL_LiquidLightKind

function RGL_LiquidLightKind(flatnum)

Classifies animated liquid flats that should emit subtle GL ambience.

ParameterTypeDefaultDescription
flatnumdynamic—Index identifying flat.

View source

RGL_LowerTextureMid

function RGL_LowerTextureMid(linedef, texnum, side, front, back)

Computes the lower wall texture origin from pegging flags, adjacent floors/ceiling, texture height, and row offset.

ParameterTypeDefaultDescription
linedefdynamic—Linedef value supplied to `RGL_LowerTextureMid`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
frontdynamic—Front value supplied to `RGL_LowerTextureMid`.
backdynamic—Back value supplied to `RGL_LowerTextureMid`.

View source

RGL_LumpNameAt

function RGL_LumpNameAt(lumpnum)

Decodes the zero-terminated name of a validated lump directory entry.

ParameterTypeDefaultDescription
lumpnumdynamic—Index identifying lump.

View source

RGL_MapGeomLumpName

function RGL_MapGeomLumpName()

Formats the current map's derived geometry-cache lump name as MAPxxGL or ExMxGL.

View source

RGL_MarkVolatileSector

function RGL_MarkVolatileSector(sec)

Resolves a sector reference by identity and marks its index for dynamic rendering outside the static cache.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_MarkVolatileSector`.

View source

RGL_MarkVolatileSectorIndex

function RGL_MarkVolatileSectorIndex(idx)

Marks a sector as dynamic so it is drawn outside the static GL cache.

ParameterTypeDefaultDescription
idxdynamic—Zero-based element or table index.

View source

rgl_masked_array_batches

rgl_masked_array_batches

Stores the rgl masked array batches collection used by the r gl subsystem.

View source

rgl_masked_display_list_id

rgl_masked_display_list_id

Tracks the mutable rgl masked display list id value used by the r gl subsystem.

View source

rgl_masked_native_record_count

rgl_masked_native_record_count

Tracks the mutable rgl masked native record count value used by the r gl subsystem.

View source

rgl_masked_native_records

rgl_masked_native_records

Tracks the mutable rgl masked native records value used by the r gl subsystem.

View source

rgl_masked_native_texture_revision

rgl_masked_native_texture_revision

Tracks the mutable rgl masked native texture revision value used by the r gl subsystem.

View source

rgl_masked_quads

rgl_masked_quads

Stores the rgl masked quads collection used by the r gl subsystem.

View source

RGL_MAX_DYNAMIC_LIGHTS

const RGL_MAX_DYNAMIC_LIGHTS = 48

Defines the maximum rgl max dynamic lights accepted by the r gl subsystem.

View source

RGL_MAX_SURFACE_LIGHTS

const RGL_MAX_SURFACE_LIGHTS = 24

Defines the maximum rgl max surface lights accepted by the r gl subsystem.

View source

RGL_MidTextureMid

function RGL_MidTextureMid(linedef, texnum, side, front, back)

Computes one- or two-sided middle-texture origin according to bottom pegging and the visible opening bounds.

ParameterTypeDefaultDescription
linedefdynamic—Linedef value supplied to `RGL_MidTextureMid`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
frontdynamic—Front value supplied to `RGL_MidTextureMid`.
backdynamic—Back value supplied to `RGL_MidTextureMid`.

View source

RGL_MidTextureOrZero

inline function RGL_MidTextureOrZero(side)

Reads a sidedef's middle texture number, returning zero for missing data.

ParameterTypeDefaultDescription
sidedynamic—Map side affected by the operation.

View source

RGL_MobjDecorLight

function RGL_MobjDecorLight(mo, x, z)

Adds subtle OpenGL light from decorative light-emitting map objects.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.
xdynamic—Horizontal map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_MobjExplosionLight

function RGL_MobjExplosionLight(mo, x, y, z)

Adds short, bright OpenGL lights for explosion animation states.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_MobjLight

function RGL_MobjLight(mo)

Classifies a mobj's type/state and emits the matching projectile, explosion, muzzle, or decorative dynamic light.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.

View source

RGL_NATIVE_BATCH_RECORD_SIZE

const RGL_NATIVE_BATCH_RECORD_SIZE = 28

Defines rgl native batch record size for the r gl subsystem.

View source

RGL_NormalizeDegrees

function RGL_NormalizeDegrees(d)

Wraps an arbitrary degree value into the half-open [0,360) interval.

ParameterTypeDefaultDescription
ddynamic—Divisor or direction value used by the operation.

View source

RGL_OppositeSide

function RGL_OppositeSide(linedef, side)

Resolves the sidedef opposite a known line side, with validation of both sidenum entries.

ParameterTypeDefaultDescription
linedefdynamic—Linedef value supplied to `RGL_OppositeSide`.
sidedynamic—Map side affected by the operation.

View source

RGL_PackNativeSprite

inline function RGL_PackNativeSprite(mo, lump, flip, records, recordIndex)

Resolves and packs one visible mobj while caching immutable patch metrics.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.
lumpdynamic—Lump value supplied to `RGL_PackNativeSprite`.
flipdynamic—Flip value supplied to `RGL_PackNativeSprite`.
recordsdynamic—Records value supplied to `RGL_PackNativeSprite`.
recordIndexdynamic—Index identifying record.

View source

rgl_palette_revision_seen

rgl_palette_revision_seen

Tracks the mutable rgl palette revision seen value used by the r gl subsystem.

View source

rgl_pending_sig_sector_motion

rgl_pending_sig_sector_motion

Tracks the mutable rgl pending sig sector motion value used by the r gl subsystem.

View source

rgl_pending_sig_sides

rgl_pending_sig_sides

Tracks the mutable rgl pending sig sides value used by the r gl subsystem.

View source

rgl_pending_stable_frames

rgl_pending_stable_frames

Tracks the mutable rgl pending stable frames value used by the r gl subsystem.

View source

RGL_PlayerNearActiveSectorMotion

function RGL_PlayerNearActiveSectorMotion(player)

Uses the accurate direct renderer when the player is near moving sectors.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

RGL_PointInTriangle

function RGL_PointInTriangle(px, py, ax, ay, bx, by, cx, cy)

Tests whether a fixed-point point lies inside or on a triangle using sign-consistent edge cross products.

ParameterTypeDefaultDescription
pxdynamic—Horizontal coordinate or vector component represented by px.
pydynamic—Vertical coordinate or vector component represented by py.
axdynamic—Horizontal coordinate or vector component represented by ax.
aydynamic—Vertical coordinate or vector component represented by ay.
bxdynamic—Horizontal coordinate or vector component represented by bx.
bydynamic—Vertical coordinate or vector component represented by by.
cxdynamic—Horizontal coordinate or vector component represented by cx.
cydynamic—Vertical coordinate or vector component represented by cy.

View source

RGL_ProfileEnd

inline function RGL_ProfileEnd(slot, start)

Adds elapsed time to one fine-grained renderer profiling slot.

ParameterTypeDefaultDescription
slotdynamic—Slot value supplied to `RGL_ProfileEnd`.
startdynamic—Start value supplied to `RGL_ProfileEnd`.

View source

RGL_ProfileStart

inline function RGL_ProfileStart()

Returns a timestamp for fine-grained renderer profiling.

View source

rgl_quad_t struct

RGL_ReadGeomDepthQuad

function RGL_ReadGeomDepthQuad(buf, off)

Deserializes one depth-only quad and returns it with the next unread offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadGeomDepthQuad`.
offdynamic—Zero-based byte or element offset.

View source

RGL_ReadGeomDepthTri

function RGL_ReadGeomDepthTri(buf, off)

Deserializes one depth-only triangle and returns it with the next unread offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadGeomDepthTri`.
offdynamic—Zero-based byte or element offset.

View source

RGL_ReadGeomFlatTri

function RGL_ReadGeomFlatTri(buf, off)

Deserializes one flat triangle and returns it together with the next unread byte offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadGeomFlatTri`.
offdynamic—Zero-based byte or element offset.

View source

RGL_ReadGeomQuad

function RGL_ReadGeomQuad(buf, off)

Deserializes one textured quad and returns it together with the next unread byte offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadGeomQuad`.
offdynamic—Zero-based byte or element offset.

View source

RGL_ReadS32

inline function RGL_ReadS32(buf, off)

Decodes a little-endian 32-bit value and restores its signed interpretation.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadS32`.
offdynamic—Zero-based byte or element offset.

View source

RGL_ReadU32

inline function RGL_ReadU32(buf, off)

Decodes an unsigned little-endian 32-bit value from serialized geometry bytes.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_ReadU32`.
offdynamic—Zero-based byte or element offset.

View source

RGL_RebuildNativeArrayBatchRecords

function RGL_RebuildNativeArrayBatchRecords()

Builds native helper draw-record buffers for VBO-backed static geometry batches.

View source

RGL_RebuildScrollingArrayBatches

function RGL_RebuildScrollingArrayBatches(currentTic, currentMap, currentLevelTime)

Uploads one game tic's scrolling wall geometry while preserving static caches.

ParameterTypeDefaultDescription
currentTicdynamic—Current tic value supplied to `RGL_RebuildScrollingArrayBatches`.
currentMapdynamic—Current map value supplied to `RGL_RebuildScrollingArrayBatches`.
currentLevelTimedynamic—Current level time value supplied to `RGL_RebuildScrollingArrayBatches`.

View source

RGL_RebuildVolatileArrayBatches

function RGL_RebuildVolatileArrayBatches(signature)

Uploads the current volatile meshes to VBOs while preserving the static cache state.

ParameterTypeDefaultDescription
signaturedynamic—Signature value supplied to `RGL_RebuildVolatileArrayBatches`.

View source

RGL_RenderPlayerView

function RGL_RenderPlayerView(player)

Sets the interpolated camera, updates caches/lights, executes ordered opaque/sprite/masked passes, and presents one GL view.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

RGL_ResetScrollingArrayBatches

function RGL_ResetScrollingArrayBatches()

Releases cached geometry for continuously scrolling walls.

View source

RGL_ResetStaticArrayBatches

function RGL_ResetStaticArrayBatches()

Invalidates prepacked OpenGL client-array batches after geometry changes.

View source

RGL_ResetStaticDisplayLists

function RGL_ResetStaticDisplayLists()

Invalidates compiled static geometry after map geometry changes.

View source

RGL_ResetVolatileArrayBatches

function RGL_ResetVolatileArrayBatches()

Invalidates VBO batches generated from potentially moving sector geometry.

View source

RGL_ResolveFlatNum

inline function RGL_ResolveFlatNum(flatnum)

Resolves Doom flat animation translation for OpenGL flat binding.

ParameterTypeDefaultDescription
flatnumdynamic—Index identifying flat.

View source

RGL_ResolveTextureNum

inline function RGL_ResolveTextureNum(texnum)

Resolves Doom texture animation translation for OpenGL texture binding.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_Restore3DProjection

function RGL_Restore3DProjection()

Rebuilds the perspective frustum and identity model-view matrix after screen-space sky or weapon drawing.

View source

rgl_scrolling_array_batches_ready

rgl_scrolling_array_batches_ready

Tracks whether rgl scrolling array batches ready is active in the r gl subsystem.

View source

rgl_scrolling_geometry_last_gametic

rgl_scrolling_geometry_last_gametic

Tracks the mutable rgl scrolling geometry last gametic value used by the r gl subsystem.

View source

rgl_scrolling_geometry_last_leveltime

rgl_scrolling_geometry_last_leveltime

Tracks the mutable rgl scrolling geometry last leveltime value used by the r gl subsystem.

View source

rgl_scrolling_geometry_last_map

rgl_scrolling_geometry_last_map

Tracks the mutable rgl scrolling geometry last map value used by the r gl subsystem.

View source

rgl_scrolling_lines

rgl_scrolling_lines

Stores the rgl scrolling lines collection used by the r gl subsystem.

View source

rgl_scrolling_masked_array_batches

rgl_scrolling_masked_array_batches

Stores the rgl scrolling masked array batches collection used by the r gl subsystem.

View source

rgl_scrolling_masked_native_record_count

rgl_scrolling_masked_native_record_count

Tracks the mutable rgl scrolling masked native record count value used by the r gl subsystem.

View source

rgl_scrolling_masked_native_records

rgl_scrolling_masked_native_records

Tracks the mutable rgl scrolling masked native records value used by the r gl subsystem.

View source

rgl_scrolling_masked_texture_revision

rgl_scrolling_masked_texture_revision

Tracks the mutable rgl scrolling masked texture revision value used by the r gl subsystem.

View source

rgl_scrolling_segs

rgl_scrolling_segs

Stores the rgl scrolling segs collection used by the r gl subsystem.

View source

rgl_scrolling_sides

rgl_scrolling_sides

Stores the rgl scrolling sides collection used by the r gl subsystem.

View source

rgl_scrolling_wall_array_batches

rgl_scrolling_wall_array_batches

Stores the rgl scrolling wall array batches collection used by the r gl subsystem.

View source

rgl_scrolling_wall_native_record_count

rgl_scrolling_wall_native_record_count

Tracks the mutable rgl scrolling wall native record count value used by the r gl subsystem.

View source

rgl_scrolling_wall_native_records

rgl_scrolling_wall_native_records

Tracks the mutable rgl scrolling wall native records value used by the r gl subsystem.

View source

rgl_scrolling_wall_texture_revision

rgl_scrolling_wall_texture_revision

Tracks the mutable rgl scrolling wall texture revision value used by the r gl subsystem.

View source

RGL_SectorIndex

function RGL_SectorIndex(sec)

Finds the current map index for a sector reference.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_SectorIndex`.

View source

RGL_SectorMotionSignature

function RGL_SectorMotionSignature()

Hashes sector floor/ceiling heights for geometry invalidation while deliberately excluding light flicker.

View source

RGL_SectorNearFixedPoint

function RGL_SectorNearFixedPoint(sec, x, y, radius)

Checks whether a sector is near a fixed-point map coordinate.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_SectorNearFixedPoint`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
radiusdynamic—Radius value supplied to `RGL_SectorNearFixedPoint`.

View source

RGL_SectorTouchesSkyCeiling

function RGL_SectorTouchesSkyCeiling(sec)

Reports whether any sector-adjacent line leads to another sector whose ceiling uses the sky flat.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `RGL_SectorTouchesSkyCeiling`.

View source

RGL_SegTextureOffset

function RGL_SegTextureOffset(sg, opposite)

Returns a seg's map-authored texture distance, or the complementary distance when drawing the opposite orientation.

ParameterTypeDefaultDescription
sgdynamic—Sg value supplied to `RGL_SegTextureOffset`.
oppositedynamic—Opposite value supplied to `RGL_SegTextureOffset`.

View source

RGL_SelectSpriteLump

function RGL_SelectSpriteLump(thing, player)

Resolves an mobj frame and view-relative rotation to its relative sprite lump and horizontal flip flag.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.
playerdynamic—Player state affected by the operation.

View source

RGL_SeqLen

inline function RGL_SeqLen(v)

Returns a supported sequence length or -1 so cache signatures can distinguish absent data.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_SerializeGeometryCache

function RGL_SerializeGeometryCache(sigMap, sigSegs, sigLines, sigNodes, sigSubsectors, sigSectorMotion, sigSides)

Writes signatures, collection counts, and every cached geometry record into the versioned MGL1 blob.

ParameterTypeDefaultDescription
sigMapdynamic—Sig map value supplied to `RGL_SerializeGeometryCache`.
sigSegsdynamic—Sig segs value supplied to `RGL_SerializeGeometryCache`.
sigLinesdynamic—Sig lines value supplied to `RGL_SerializeGeometryCache`.
sigNodesdynamic—Sig nodes value supplied to `RGL_SerializeGeometryCache`.
sigSubsectorsdynamic—Sig subsectors value supplied to `RGL_SerializeGeometryCache`.
sigSectorMotiondynamic—Sig sector motion value supplied to `RGL_SerializeGeometryCache`.
sigSidesdynamic—Sig sides value supplied to `RGL_SerializeGeometryCache`.

View source

RGL_SetForceSoftware

function RGL_SetForceSoftware(v)

Enables or clears the explicit software-renderer override from a validated boolean input.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

RGL_SetVertexLight

function RGL_SetVertexLight(base, x, y, z)

Evaluates view fade and nearby dynamic lights at a world vertex, then sets an opaque OpenGL color.

ParameterTypeDefaultDescription
basedynamic—Base value supplied to `RGL_SetVertexLight`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_SetVertexLightAlpha

function RGL_SetVertexLightAlpha(base, x, y, z, alpha)

Evaluates view fade and nearby dynamic lights at a world point, then sets the resulting OpenGL color with caller alpha.

ParameterTypeDefaultDescription
basedynamic—Base value supplied to `RGL_SetVertexLightAlpha`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.
alphadynamic—Alpha value supplied to `RGL_SetVertexLightAlpha`.

View source

rgl_side_sig_gametic

rgl_side_sig_gametic

Tracks the mutable rgl side sig gametic value used by the r gl subsystem.

View source

rgl_side_sig_leveltime

rgl_side_sig_leveltime

Tracks the mutable rgl side sig leveltime value used by the r gl subsystem.

View source

rgl_side_sig_map

rgl_side_sig_map

Tracks the mutable rgl side sig map value used by the r gl subsystem.

View source

rgl_side_sig_value

rgl_side_sig_value

Tracks the mutable rgl side sig value value used by the r gl subsystem.

View source

RGL_SideOrFallback

inline function RGL_SideOrFallback(side, fallback)

Returns a preferred sidedef when present, otherwise the caller-supplied fallback.

ParameterTypeDefaultDescription
sidedynamic—Map side affected by the operation.
fallbackdynamic—Value returned when the requested conversion or lookup is unavailable.

View source

RGL_SideRowOffset

inline function RGL_SideRowOffset(side)

Reads a sidedef's fixed vertical texture offset, defaulting to zero.

ParameterTypeDefaultDescription
sidedynamic—Map side affected by the operation.

View source

RGL_SideTextureSignature

function RGL_SideTextureSignature()

Computes a once-per-tic hash of sidedef textures and non-scrolling offsets for cache invalidation.

View source

RGL_SkySForPoint

function RGL_SkySForPoint(x, y)

Computes view-yaw-relative horizontal sky texture coordinates from a world-space point.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

RGL_SortBatchGroupsByKey

function RGL_SortBatchGroupsByKey(keys, groups)

Orders static batch groups by numeric key so texture binds stay clustered.

ParameterTypeDefaultDescription
keysdynamic—Keys value supplied to `RGL_SortBatchGroupsByKey`.
groupsdynamic—Groups value supplied to `RGL_SortBatchGroupsByKey`.

View source

RGL_SPATIAL_BATCH_CELL

const RGL_SPATIAL_BATCH_CELL = 1024.

Defines rgl spatial batch cell for the r gl subsystem.

View source

RGL_SPATIAL_BATCH_ORIGIN

const RGL_SPATIAL_BATCH_ORIGIN = 32768.

Defines rgl spatial batch origin for the r gl subsystem.

View source

RGL_SPATIAL_BATCH_STRIDE

const RGL_SPATIAL_BATCH_STRIDE = 128

Defines rgl spatial batch stride for the r gl subsystem.

View source

RGL_SpatialBatchCellKey

function RGL_SpatialBatchCellKey(x, z)

Maps a world-space point to a coarse static-geometry batch cell.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

rgl_sprite_fuzz_tex_ids

rgl_sprite_fuzz_tex_ids

Stores the rgl sprite fuzz tex ids collection used by the r gl subsystem.

View source

rgl_sprite_height_cache

rgl_sprite_height_cache

Stores the rgl sprite height cache collection used by the r gl subsystem.

View source

rgl_sprite_light_records

rgl_sprite_light_records

Tracks the mutable rgl sprite light records value used by the r gl subsystem.

View source

rgl_sprite_light_revision

rgl_sprite_light_revision

Tracks the mutable rgl sprite light revision value used by the r gl subsystem.

View source

rgl_sprite_native_records

rgl_sprite_native_records

Tracks the mutable rgl sprite native records value used by the r gl subsystem.

View source

RGL_SPRITE_RECORD_SIZE

const RGL_SPRITE_RECORD_SIZE = 36

Defines rgl sprite record size for the r gl subsystem.

View source

rgl_sprite_tex_ids

rgl_sprite_tex_ids

Stores the rgl sprite tex ids collection used by the r gl subsystem.

View source

rgl_sprite_width_cache

rgl_sprite_width_cache

Stores the rgl sprite width cache collection used by the r gl subsystem.

View source

rgl_sprite_yoffset_cache

rgl_sprite_yoffset_cache

Stores the rgl sprite yoffset cache collection used by the r gl subsystem.

View source

RGL_SpriteEntryForLump

function RGL_SpriteEntryForLump(lump)

Resolves a relative sprite lump to its upscaled sprite asset, falling back to the generic patch cache.

ParameterTypeDefaultDescription
lumpdynamic—Lump value supplied to `RGL_SpriteEntryForLump`.

View source

RGL_SpriteIndex

inline function RGL_SpriteIndex(v)

Resolves a sprite identifier against the currently loaded sprite definition count.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

rgl_static_array_batches_ready

rgl_static_array_batches_ready

Tracks whether rgl static array batches ready is active in the r gl subsystem.

View source

rgl_static_display_lists_ready

rgl_static_display_lists_ready

Tracks whether rgl static display lists ready is active in the r gl subsystem.

View source

rgl_static_world_display_list_id

rgl_static_world_display_list_id

Tracks the mutable rgl static world display list id value used by the r gl subsystem.

View source

RGL_StaticVertexLit

function RGL_StaticVertexLit(base, x, y, z)

Emits static sector lighting for compiled OpenGL geometry batches.

ParameterTypeDefaultDescription
basedynamic—Base value supplied to `RGL_StaticVertexLit`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

RGL_StringStartsWith

function RGL_StringStartsWith(s, prefix)

Tests a short ASCII prefix without relying on optional string helpers.

ParameterTypeDefaultDescription
sdynamic—S value supplied to `RGL_StringStartsWith`.
prefixdynamic—Prefix value supplied to `RGL_StringStartsWith`.

View source

RGL_SyncPaletteRevision

function RGL_SyncPaletteRevision()

Invalidates every palette-derived GL texture and dependent static/dynamic batch when the indexed palette changes.

View source

rgl_tex_ids

rgl_tex_ids

Stores the rgl tex ids collection used by the r gl subsystem.

View source

rgl_tex_keys

rgl_tex_keys

Stores the rgl tex keys collection used by the r gl subsystem.

View source

rgl_texnum_tex_ids

rgl_texnum_tex_ids

Stores the rgl texnum tex ids collection used by the r gl subsystem.

View source

rgl_texnum_trans_tex_ids

rgl_texnum_trans_tex_ids

Stores the rgl texnum trans tex ids collection used by the r gl subsystem.

View source

RGL_TextureHeight

function RGL_TextureHeight(texnum)

Returns the translated texture's positive pixel height, with a 64-pixel fallback.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TextureHeightFixed

function RGL_TextureHeightFixed(texnum)

Returns a texture height in Doom fixed-point units from textureheight or pixel metadata fallback.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TextureIdForFlatnum

function RGL_TextureIdForFlatnum(flatnum)

Resolves flat animation, uploads the named repeat-wrapped flat once, and caches its GL texture id.

ParameterTypeDefaultDescription
flatnumdynamic—Index identifying flat.

View source

RGL_TextureIdForSpriteFuzzLump

function RGL_TextureIdForSpriteFuzzLump(lump)

Returns a neutral alpha-mask texture for shadow/fuzz sprite billboards.

ParameterTypeDefaultDescription
lumpdynamic—Lump value supplied to `RGL_TextureIdForSpriteFuzzLump`.

View source

RGL_TextureIdForSpriteLump

function RGL_TextureIdForSpriteLump(lump)

Loads a sprite/patch lump as a clamped cutout texture and caches its GL id by relative sprite lump.

ParameterTypeDefaultDescription
lumpdynamic—Lump value supplied to `RGL_TextureIdForSpriteLump`.

View source

RGL_TextureIdForTexnum

function RGL_TextureIdForTexnum(texnum)

Resolves animation, uploads a repeat-wrapped opaque wall texture once, and caches its GL id by texture number.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TextureIdForTexnumTransparent

function RGL_TextureIdForTexnumTransparent(texnum)

Resolves animation, uploads a repeat-wrapped cutout wall texture once, and caches its GL id separately.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TextureName

function RGL_TextureName(texnum)

Returns the name of the currently animation-translated texture, or an empty string when invalid.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TextureWidth

function RGL_TextureWidth(texnum)

Returns the translated texture's positive pixel width, with a 64-pixel fallback.

ParameterTypeDefaultDescription
texnumdynamic—Index identifying tex.

View source

RGL_TopTextureOrZero

inline function RGL_TopTextureOrZero(side)

Reads a sidedef's upper texture number, returning zero for missing data.

ParameterTypeDefaultDescription
sidedynamic—Map side affected by the operation.

View source

RGL_TryLoadGeometryCache

function RGL_TryLoadGeometryCache(sigMap, sigSegs, sigLines, sigNodes, sigSubsectors, sigSectorMotion, sigSides)

Validates a versioned map geometry lump against current signatures, restores its lists, and rebuilds runtime batches.

ParameterTypeDefaultDescription
sigMapdynamic—Sig map value supplied to `RGL_TryLoadGeometryCache`.
sigSegsdynamic—Sig segs value supplied to `RGL_TryLoadGeometryCache`.
sigLinesdynamic—Sig lines value supplied to `RGL_TryLoadGeometryCache`.
sigNodesdynamic—Sig nodes value supplied to `RGL_TryLoadGeometryCache`.
sigSubsectorsdynamic—Sig subsectors value supplied to `RGL_TryLoadGeometryCache`.
sigSectorMotiondynamic—Sig sector motion value supplied to `RGL_TryLoadGeometryCache`.
sigSidesdynamic—Sig sides value supplied to `RGL_TryLoadGeometryCache`.

View source

RGL_UpdateFlatNativeRecordTextures

function RGL_UpdateFlatNativeRecordTextures()

Refreshes flat native draw-record texture ids for animated flat translation.

View source

RGL_UpdateMaskedNativeRecordTextures

function RGL_UpdateMaskedNativeRecordTextures()

Refreshes masked-wall texture ids while retaining spatially culled VBO records.

View source

RGL_UpdateScrollingMaskedRecordTextures

function RGL_UpdateScrollingMaskedRecordTextures()

Refreshes cutout scroller native record texture ids while preserving current UV geometry and VBOs.

View source

RGL_UpdateScrollingWallRecordTextures

function RGL_UpdateScrollingWallRecordTextures()

Refreshes opaque scroller native record texture ids while preserving current UV geometry and VBOs.

View source

RGL_UpdateVolatileFlatRecordTextures

function RGL_UpdateVolatileFlatRecordTextures()

Refreshes moving-floor/ceiling native record texture ids only when the flat-animation revision changes.

View source

RGL_UpdateVolatileMaskedRecordTextures

function RGL_UpdateVolatileMaskedRecordTextures()

Refreshes moving cutout-wall native record texture ids only when the animation revision changes.

View source

RGL_UpdateVolatileWallRecordTextures

function RGL_UpdateVolatileWallRecordTextures()

Refreshes moving-wall native record texture ids only when the animation revision changes.

View source

RGL_UpdateWallNativeRecordTextures

function RGL_UpdateWallNativeRecordTextures()

Refreshes wall native draw-record texture ids for animated texture translation.

View source

RGL_UpperTextureMid

function RGL_UpperTextureMid(linedef, texnum, side, front, back)

Computes the upper wall texture origin from pegging flags, adjacent ceilings, texture height, and row offset.

ParameterTypeDefaultDescription
linedefdynamic—Linedef value supplied to `RGL_UpperTextureMid`.
texnumdynamic—Index identifying tex.
sidedynamic—Map side affected by the operation.
frontdynamic—Front value supplied to `RGL_UpperTextureMid`.
backdynamic—Back value supplied to `RGL_UpperTextureMid`.

View source

RGL_Vertex

inline function RGL_Vertex(v, z)

Converts a Doom map vertex and fixed height to OpenGL axes and emits it with current-sector lighting.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.
zdynamic—Vertical world-space coordinate.

View source

RGL_VertexLit

function RGL_VertexLit(base, x, y, z)

Applies static plus nearby dynamic lighting at a world point and emits that OpenGL vertex.

ParameterTypeDefaultDescription
basedynamic—Base value supplied to `RGL_VertexLit`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.

View source

rgl_view_x

rgl_view_x

Tracks the mutable rgl view x value used by the r gl subsystem.

View source

rgl_view_y

rgl_view_y

Tracks the mutable rgl view y value used by the r gl subsystem.

View source

rgl_view_yaw

rgl_view_yaw

Tracks the mutable rgl view yaw value used by the r gl subsystem.

View source

rgl_volatile_array_batches_ready

rgl_volatile_array_batches_ready

Tracks whether rgl volatile array batches ready is active in the r gl subsystem.

View source

rgl_volatile_flat_array_batches

rgl_volatile_flat_array_batches

Stores the rgl volatile flat array batches collection used by the r gl subsystem.

View source

rgl_volatile_flat_native_record_count

rgl_volatile_flat_native_record_count

Tracks the mutable rgl volatile flat native record count value used by the r gl subsystem.

View source

rgl_volatile_flat_native_records

rgl_volatile_flat_native_records

Tracks the mutable rgl volatile flat native records value used by the r gl subsystem.

View source

rgl_volatile_flat_template_t struct

rgl_volatile_flat_templates

rgl_volatile_flat_templates

Stores the rgl volatile flat templates collection used by the r gl subsystem.

View source

rgl_volatile_flat_texture_revision

rgl_volatile_flat_texture_revision

Tracks the mutable rgl volatile flat texture revision value used by the r gl subsystem.

View source

rgl_volatile_geometry_last_gametic

rgl_volatile_geometry_last_gametic

Tracks the mutable rgl volatile geometry last gametic value used by the r gl subsystem.

View source

rgl_volatile_geometry_last_leveltime

rgl_volatile_geometry_last_leveltime

Tracks the mutable rgl volatile geometry last leveltime value used by the r gl subsystem.

View source

rgl_volatile_geometry_signature

rgl_volatile_geometry_signature

Tracks the mutable rgl volatile geometry signature value used by the r gl subsystem.

View source

rgl_volatile_immediate_active

rgl_volatile_immediate_active

Tracks whether rgl volatile immediate active is active in the r gl subsystem.

View source

rgl_volatile_lines

rgl_volatile_lines

Stores the rgl volatile lines collection used by the r gl subsystem.

View source

rgl_volatile_masked_array_batches

rgl_volatile_masked_array_batches

Stores the rgl volatile masked array batches collection used by the r gl subsystem.

View source

rgl_volatile_masked_native_record_count

rgl_volatile_masked_native_record_count

Tracks the mutable rgl volatile masked native record count value used by the r gl subsystem.

View source

rgl_volatile_masked_native_records

rgl_volatile_masked_native_records

Tracks the mutable rgl volatile masked native records value used by the r gl subsystem.

View source

rgl_volatile_masked_texture_revision

rgl_volatile_masked_texture_revision

Tracks the mutable rgl volatile masked texture revision value used by the r gl subsystem.

View source

rgl_volatile_pending_signature

rgl_volatile_pending_signature

Tracks the mutable rgl volatile pending signature value used by the r gl subsystem.

View source

rgl_volatile_pending_stable_tics

rgl_volatile_pending_stable_tics

Tracks the mutable rgl volatile pending stable tics value used by the r gl subsystem.

View source

rgl_volatile_sectors

rgl_volatile_sectors

Stores the rgl volatile sectors collection used by the r gl subsystem.

View source

rgl_volatile_segs

rgl_volatile_segs

Stores the rgl volatile segs collection used by the r gl subsystem.

View source

rgl_volatile_sig_map

rgl_volatile_sig_map

Tracks the mutable rgl volatile sig map value used by the r gl subsystem.

View source

rgl_volatile_subsectors

rgl_volatile_subsectors

Stores the rgl volatile subsectors collection used by the r gl subsystem.

View source

rgl_volatile_wall_array_batches

rgl_volatile_wall_array_batches

Stores the rgl volatile wall array batches collection used by the r gl subsystem.

View source

rgl_volatile_wall_native_record_count

rgl_volatile_wall_native_record_count

Tracks the mutable rgl volatile wall native record count value used by the r gl subsystem.

View source

rgl_volatile_wall_native_records

rgl_volatile_wall_native_records

Tracks the mutable rgl volatile wall native records value used by the r gl subsystem.

View source

rgl_volatile_wall_texture_revision

rgl_volatile_wall_texture_revision

Tracks the mutable rgl volatile wall texture revision value used by the r gl subsystem.

View source

RGL_VolatileGeometrySignature

function RGL_VolatileGeometrySignature()

Tracks only state that can change the precomputed volatile-sector meshes.

View source

RGL_WALL_ARRAY_BATCH_QUADS

const RGL_WALL_ARRAY_BATCH_QUADS = 4096

Defines rgl wall array batch quads for the r gl subsystem.

View source

rgl_wall_array_batches

rgl_wall_array_batches

Stores the rgl wall array batches collection used by the r gl subsystem.

View source

rgl_wall_display_list_ids

rgl_wall_display_list_ids

Stores the rgl wall display list ids collection used by the r gl subsystem.

View source

rgl_wall_display_list_texnums

rgl_wall_display_list_texnums

Stores the rgl wall display list texnums collection used by the r gl subsystem.

View source

rgl_wall_display_list_transparents

rgl_wall_display_list_transparents

Stores the rgl wall display list transparents collection used by the r gl subsystem.

View source

rgl_wall_native_record_count

rgl_wall_native_record_count

Tracks the mutable rgl wall native record count value used by the r gl subsystem.

View source

rgl_wall_native_records

rgl_wall_native_records

Tracks the mutable rgl wall native records value used by the r gl subsystem.

View source

rgl_wall_native_texture_revision

rgl_wall_native_texture_revision

Tracks the mutable rgl wall native texture revision value used by the r gl subsystem.

View source

rgl_wall_quads

rgl_wall_quads

Stores the rgl wall quads collection used by the r gl subsystem.

View source

RGL_WallArrayBatchKey

function RGL_WallArrayBatchKey(q)

Builds a combined texture and spatial key for static wall batching.

ParameterTypeDefaultDescription
qdynamic—Q value supplied to `RGL_WallArrayBatchKey`.

View source

RGL_WORLD_SPRITE_FOOT_LIFT

const RGL_WORLD_SPRITE_FOOT_LIFT = 4.

Defines rgl world sprite foot lift for the r gl subsystem.

View source

RGL_WORLD_VIEW_DISTANCE

const RGL_WORLD_VIEW_DISTANCE = 12288.

Keeps MAP32's roughly 7000-unit sightlines inside both the GL frustum and sprite culler with safe margin. Defines rgl world view distance for the r gl subsystem.

View source

RGL_WriteGeomArrayVertex

function RGL_WriteGeomArrayVertex(vertices, voff, texcoords, toff, colors, coff, x, y, z, s, t, light)

Appends one scaled vertex, texture coordinate, and static color to client-array buffers.

ParameterTypeDefaultDescription
verticesdynamic—Vertices value supplied to `RGL_WriteGeomArrayVertex`.
voffdynamic—Voff value supplied to `RGL_WriteGeomArrayVertex`.
texcoordsdynamic—Texcoords value supplied to `RGL_WriteGeomArrayVertex`.
toffdynamic—Toff value supplied to `RGL_WriteGeomArrayVertex`.
colorsdynamic—Colors value supplied to `RGL_WriteGeomArrayVertex`.
coffdynamic—Coff value supplied to `RGL_WriteGeomArrayVertex`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.
sdynamic—S value supplied to `RGL_WriteGeomArrayVertex`.
tdynamic—T value supplied to `RGL_WriteGeomArrayVertex`.
lightdynamic—Light value supplied to `RGL_WriteGeomArrayVertex`.

View source

RGL_WriteGeomDepthQuad

function RGL_WriteGeomDepthQuad(buf, off, q)

Serializes the four positions of a depth-only sky-occlusion quad.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomDepthQuad`.
offdynamic—Zero-based byte or element offset.
qdynamic—Q value supplied to `RGL_WriteGeomDepthQuad`.

View source

RGL_WriteGeomDepthTri

function RGL_WriteGeomDepthTri(buf, off, t)

Serializes the three positions of a depth-only sky-occlusion triangle.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomDepthTri`.
offdynamic—Zero-based byte or element offset.
tdynamic—T value supplied to `RGL_WriteGeomDepthTri`.

View source

RGL_WriteGeomFixed

function RGL_WriteGeomFixed(buf, off, v)

Quantizes and appends one floating geometry component, returning the next byte offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomFixed`.
offdynamic—Zero-based byte or element offset.
vdynamic—Value consumed by the operation.

View source

RGL_WriteGeomFlatTri

function RGL_WriteGeomFlatTri(buf, off, t)

Serializes a flat triangle's texture/light metadata, positions, and UVs and returns the next offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomFlatTri`.
offdynamic—Zero-based byte or element offset.
tdynamic—T value supplied to `RGL_WriteGeomFlatTri`.

View source

RGL_WriteGeomInterleavedVertex

function RGL_WriteGeomInterleavedVertex(buf, off, x, y, z, s, t, light)

Appends one scaled vertex, texture coordinate, and static color to an interleaved VBO buffer.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomInterleavedVertex`.
offdynamic—Zero-based byte or element offset.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
zdynamic—Vertical world-space coordinate.
sdynamic—S value supplied to `RGL_WriteGeomInterleavedVertex`.
tdynamic—T value supplied to `RGL_WriteGeomInterleavedVertex`.
lightdynamic—Light value supplied to `RGL_WriteGeomInterleavedVertex`.

View source

RGL_WriteGeomQuad

function RGL_WriteGeomQuad(buf, off, q)

Serializes a textured quad's metadata, four positions, and four UV pairs and returns the next offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteGeomQuad`.
offdynamic—Zero-based byte or element offset.
qdynamic—Q value supplied to `RGL_WriteGeomQuad`.

View source

RGL_WriteNativeBatchRecord

function RGL_WriteNativeBatchRecord(records, index, texid, batch, flags)

Writes one native helper draw record for a prepacked static geometry batch.

ParameterTypeDefaultDescription
recordsdynamic—Records value supplied to `RGL_WriteNativeBatchRecord`.
indexdynamic—Zero-based element or table index.
texiddynamic—Texid value supplied to `RGL_WriteNativeBatchRecord`.
batchdynamic—Batch value supplied to `RGL_WriteNativeBatchRecord`.
flagsdynamic—Bit flags that control the operation.

View source

RGL_WriteS32

inline function RGL_WriteS32(buf, off, value)

Encodes a signed integer through the shared little-endian 32-bit writer.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteS32`.
offdynamic—Zero-based byte or element offset.
valuedynamic—Value consumed by the operation.

View source

RGL_WriteU32

inline function RGL_WriteU32(buf, off, value)

Encodes the low 32 bits of a value in little-endian cache/native-record format.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `RGL_WriteU32`.
offdynamic—Zero-based byte or element offset.
valuedynamic—Value consumed by the operation.

View source