Files
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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_AddCachedDepthConvexFloat`. |
ys | dynamic | — | Ys value supplied to `RGL_AddCachedDepthConvexFloat`. |
count | dynamic | — | Number of elements or iterations to process. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x0 | dynamic | — | X0 value supplied to `RGL_AddCachedDepthQuad`. |
y0 | dynamic | — | Y0 value supplied to `RGL_AddCachedDepthQuad`. |
z0 | dynamic | — | Z0 value supplied to `RGL_AddCachedDepthQuad`. |
x1 | dynamic | — | Horizontal coordinate of the first endpoint. |
y1 | dynamic | — | Vertical coordinate of the first endpoint. |
z1 | dynamic | — | Z1 value supplied to `RGL_AddCachedDepthQuad`. |
x2 | dynamic | — | Horizontal coordinate of the second endpoint. |
y2 | dynamic | — | Vertical coordinate of the second endpoint. |
z2 | dynamic | — | Z2 value supplied to `RGL_AddCachedDepthQuad`. |
x3 | dynamic | — | X3 value supplied to `RGL_AddCachedDepthQuad`. |
y3 | dynamic | — | Y3 value supplied to `RGL_AddCachedDepthQuad`. |
z3 | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_AddCachedFlatConvexFloat`. |
ys | dynamic | — | Ys value supplied to `RGL_AddCachedFlatConvexFloat`. |
count | dynamic | — | Number of elements or iterations to process. |
z | dynamic | — | Vertical world-space coordinate. |
flatnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_AddCachedWallQuad`. |
v2 | dynamic | — | V2 value supplied to `RGL_AddCachedWallQuad`. |
z0 | dynamic | — | Z0 value supplied to `RGL_AddCachedWallQuad`. |
z1 | dynamic | — | Z1 value supplied to `RGL_AddCachedWallQuad`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
transparent | dynamic | — | Transparent value supplied to `RGL_AddCachedWallQuad`. |
texturemid | dynamic | — | Texturemid value supplied to `RGL_AddCachedWallQuad`. |
wallOffset | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
r | dynamic | — | R value supplied to `RGL_AddDynamicLight`. |
g | dynamic | — | G value supplied to `RGL_AddDynamicLight`. |
b | dynamic | — | Second input operand. |
radius | dynamic | — | Radius value supplied to `RGL_AddDynamicLight`. |
strength | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | Sec value supplied to `RGL_AddSectorLiquidLight`. |
kind | dynamic | — | Kind value supplied to `RGL_AddSectorLiquidLight`. |
player | dynamic | — | Player state affected by the operation. |
pulse | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sidx | dynamic | — | Sidx value supplied to `RGL_AddVolatileFlatTemplate`. |
xs | dynamic | — | Xs value supplied to `RGL_AddVolatileFlatTemplate`. |
ys | dynamic | — | Ys value supplied to `RGL_AddVolatileFlatTemplate`. |
count | dynamic | — | 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).
| Parameter | Type | Default | Description |
|---|
a | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
batch | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texid | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
node | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
startIndex | dynamic | — | Index identifying start. |
endIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sigMap | dynamic | — | Sig map value supplied to `RGL_BuildGeometryCache`. |
sigSegs | dynamic | — | Sig segs value supplied to `RGL_BuildGeometryCache`. |
sigLines | dynamic | — | Sig lines value supplied to `RGL_BuildGeometryCache`. |
sigNodes | dynamic | — | Sig nodes value supplied to `RGL_BuildGeometryCache`. |
sigSubsectors | dynamic | — | Sig subsectors value supplied to `RGL_BuildGeometryCache`. |
sigSectorMotion | dynamic | — | Sig sector motion value supplied to `RGL_BuildGeometryCache`. |
sigSides | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sigMap | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
startIndex | dynamic | — | Index identifying start. |
endIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
key | dynamic | — | Input key code to process. |
entry | dynamic | — | Entry value supplied to `RGL_CachedTexture`. |
transparent | dynamic | — | Transparent value supplied to `RGL_CachedTexture`. |
repeatWrap | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
ss | dynamic | — | Ss value supplied to `RGL_ClipBspFlatToBoundarySegs`. |
xs | dynamic | — | Xs value supplied to `RGL_ClipBspFlatToBoundarySegs`. |
ys | dynamic | — | Ys value supplied to `RGL_ClipBspFlatToBoundarySegs`. |
count | dynamic | — | Number of elements or iterations to process. |
outx | dynamic | — | Outx value supplied to `RGL_ClipBspFlatToBoundarySegs`. |
outy | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_ClipPolyToNodeSide`. |
ys | dynamic | — | Ys value supplied to `RGL_ClipPolyToNodeSide`. |
count | dynamic | — | Number of elements or iterations to process. |
node | dynamic | — | Node value supplied to `RGL_ClipPolyToNodeSide`. |
side | dynamic | — | Map side affected by the operation. |
outx | dynamic | — | Outx value supplied to `RGL_ClipPolyToNodeSide`. |
outy | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_ClipPolyToSegFront`. |
ys | dynamic | — | Ys value supplied to `RGL_ClipPolyToSegFront`. |
count | dynamic | — | Number of elements or iterations to process. |
sg | dynamic | — | Sg value supplied to `RGL_ClipPolyToSegFront`. |
outx | dynamic | — | Outx value supplied to `RGL_ClipPolyToSegFront`. |
outy | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
startIndex | dynamic | — | Index identifying start. |
endIndex | dynamic | — | Index identifying end. |
View source
# RGL_CompileTexturedQuadDisplayList
function RGL_CompileTexturedQuadDisplayList(quads)
Compiles static textured quad lists that still use the immediate-mode fallback path.
| Parameter | Type | Default | Description |
|---|
quads | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
startIndex | dynamic | — | Index identifying start. |
endIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
ax | dynamic | — | Horizontal coordinate or vector component represented by ax. |
ay | dynamic | — | Vertical coordinate or vector component represented by ay. |
bx | dynamic | — | Horizontal coordinate or vector component represented by bx. |
by | dynamic | — | Vertical coordinate or vector component represented by by. |
cx | dynamic | — | Horizontal coordinate or vector component represented by cx. |
cy | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
z1 | dynamic | — | Z1 value supplied to `RGL_DefaultTextureMid`. |
side | dynamic | — | Map side affected by the operation. |
View source
# RGL_DeleteArrayBatchBuffers
function RGL_DeleteArrayBatchBuffers(batches)
Releases every VBO owned by an array-batch collection.
| Parameter | Type | Default | Description |
|---|
batches | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
bspnum | dynamic | — | Index identifying bsp. |
xs | dynamic | — | Xs value supplied to `RGL_DrawBspFlatNode`. |
ys | dynamic | — | Ys value supplied to `RGL_DrawBspFlatNode`. |
count | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sidx | dynamic | — | Sidx value supplied to `RGL_DrawBspLeafFlat`. |
xs | dynamic | — | Xs value supplied to `RGL_DrawBspLeafFlat`. |
ys | dynamic | — | Ys value supplied to `RGL_DrawBspLeafFlat`. |
count | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
quads | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | Player state affected by the operation. |
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | Player state affected by the operation. |
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_DrawFlatConvexFloat`. |
ys | dynamic | — | Ys value supplied to `RGL_DrawFlatConvexFloat`. |
count | dynamic | — | Number of elements or iterations to process. |
z | dynamic | — | Vertical world-space coordinate. |
flatnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
pxs | dynamic | — | Pxs value supplied to `RGL_DrawFlatPolygonEarClipped`. |
pys | dynamic | — | Pys value supplied to `RGL_DrawFlatPolygonEarClipped`. |
count | dynamic | — | Number of elements or iterations to process. |
zz | dynamic | — | Zz value supplied to `RGL_DrawFlatPolygonEarClipped`. |
textured | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
pxs | dynamic | — | Pxs value supplied to `RGL_DrawFlatTriangle`. |
pys | dynamic | — | Pys value supplied to `RGL_DrawFlatTriangle`. |
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
c | dynamic | — | C value supplied to `RGL_DrawFlatTriangle`. |
zz | dynamic | — | Zz value supplied to `RGL_DrawFlatTriangle`. |
textured | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
li | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
li | dynamic | — | Li value supplied to `RGL_DrawLineSideMidtexture`. |
sideIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawMaskedMidtexture`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawMaskedMidtexture`. |
linedef | dynamic | — | Linedef value supplied to `RGL_DrawMaskedMidtexture`. |
side | dynamic | — | Map side affected by the operation. |
front | dynamic | — | Front value supplied to `RGL_DrawMaskedMidtexture`. |
back | dynamic | — | Back value supplied to `RGL_DrawMaskedMidtexture`. |
wallOffset | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sg | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
mo | dynamic | — | Map object affected by the operation. |
lump | dynamic | — | Lump value supplied to `RGL_DrawOneSpriteBillboard`. |
flip | dynamic | — | Flip value supplied to `RGL_DrawOneSpriteBillboard`. |
rx | dynamic | — | Rx value supplied to `RGL_DrawOneSpriteBillboard`. |
rz | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sg | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_DrawSkyConvexFloat`. |
ys | dynamic | — | Ys value supplied to `RGL_DrawSkyConvexFloat`. |
count | dynamic | — | Number of elements or iterations to process. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
xs | dynamic | — | Xs value supplied to `RGL_DrawSkyDepthConvexFloat`. |
ys | dynamic | — | Ys value supplied to `RGL_DrawSkyDepthConvexFloat`. |
count | dynamic | — | Number of elements or iterations to process. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
li | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sg | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sg | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | Player state affected by the operation. |
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | Player state affected by the operation. |
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | Player state affected by the operation. |
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x0 | dynamic | — | X0 value supplied to `RGL_DrawSpriteQuad`. |
y0 | dynamic | — | Y0 value supplied to `RGL_DrawSpriteQuad`. |
x1 | dynamic | — | Horizontal coordinate of the first endpoint. |
y1 | dynamic | — | Vertical coordinate of the first endpoint. |
z0 | dynamic | — | Z0 value supplied to `RGL_DrawSpriteQuad`. |
z1 | dynamic | — | Z1 value supplied to `RGL_DrawSpriteQuad`. |
flip | dynamic | — | Flip value supplied to `RGL_DrawSpriteQuad`. |
View source
# RGL_DrawStaticArrayBatch
function RGL_DrawStaticArrayBatch(batch, mode)
Draws one prepacked OpenGL client-array geometry batch.
| Parameter | Type | Default | Description |
|---|
batch | dynamic | — | Batch value supplied to `RGL_DrawStaticArrayBatch`. |
mode | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
ss | dynamic | — | Ss value supplied to `RGL_DrawSubsectorFlat`. |
z | dynamic | — | Vertical world-space coordinate. |
flatnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
t | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawWallPiece`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawWallPiece`. |
linedef | dynamic | — | Linedef value supplied to `RGL_DrawWallPiece`. |
side | dynamic | — | Map side affected by the operation. |
front | dynamic | — | Front value supplied to `RGL_DrawWallPiece`. |
back | dynamic | — | Back value supplied to `RGL_DrawWallPiece`. |
wallOffset | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawWallQuad`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawWallQuad`. |
z0 | dynamic | — | Z0 value supplied to `RGL_DrawWallQuad`. |
z1 | dynamic | — | Z1 value supplied to `RGL_DrawWallQuad`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawWallQuadEx`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawWallQuadEx`. |
z0 | dynamic | — | Z0 value supplied to `RGL_DrawWallQuadEx`. |
z1 | dynamic | — | Z1 value supplied to `RGL_DrawWallQuadEx`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
transparent | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawWallQuadOffset`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawWallQuadOffset`. |
z0 | dynamic | — | Z0 value supplied to `RGL_DrawWallQuadOffset`. |
z1 | dynamic | — | Z1 value supplied to `RGL_DrawWallQuadOffset`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
wallOffset | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v1 | dynamic | — | V1 value supplied to `RGL_DrawWallQuadTexMid`. |
v2 | dynamic | — | V2 value supplied to `RGL_DrawWallQuadTexMid`. |
z0 | dynamic | — | Z0 value supplied to `RGL_DrawWallQuadTexMid`. |
z1 | dynamic | — | Z1 value supplied to `RGL_DrawWallQuadTexMid`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
transparent | dynamic | — | Transparent value supplied to `RGL_DrawWallQuadTexMid`. |
texturemid | dynamic | — | Texturemid value supplied to `RGL_DrawWallQuadTexMid`. |
wallOffset | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sigMap | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
limit | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
tex | dynamic | — | Texture identifier or texture data to process. |
side | dynamic | — | Map side affected by the operation. |
otherSide | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
t | dynamic | — | T value supplied to `RGL_FlatArrayBatchKey`. |
View source
# RGL_FlatNameForNum
function RGL_FlatNameForNum(flatnum)
Resolves the currently translated flat name for liquid light classification.
| Parameter | Type | Default | Description |
|---|
flatnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
tris | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
quads | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
tris | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
quads | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
View source
# RGL_IsValidFlatTri
inline function RGL_IsValidFlatTri(t)
Rejects malformed cached flat triangles before array batching.
| Parameter | Type | Default | Description |
|---|
t | dynamic | — | T value supplied to `RGL_IsValidFlatTri`. |
View source
# RGL_IsVolatileLineIndex
function RGL_IsVolatileLineIndex(idx)
Checks whether a line touches dynamic sector geometry.
| Parameter | Type | Default | Description |
|---|
idx | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | Sec value supplied to `RGL_IsVolatileSector`. |
View source
# RGL_IsVolatileSegIndex
function RGL_IsVolatileSegIndex(idx)
Checks whether a seg touches dynamic sector geometry.
| Parameter | Type | Default | Description |
|---|
idx | dynamic | — | Zero-based element or table index. |
View source
# RGL_IsVolatileSubsectorIndex
function RGL_IsVolatileSubsectorIndex(idx)
Checks whether a subsector belongs to dynamic sector geometry.
| Parameter | Type | Default | Description |
|---|
idx | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
li | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
li | dynamic | — | Li value supplied to `RGL_LineScrollsTexture`. |
View source
# RGL_LiquidLightKind
function RGL_LiquidLightKind(flatnum)
Classifies animated liquid flats that should emit subtle GL ambience.
| Parameter | Type | Default | Description |
|---|
flatnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
linedef | dynamic | — | Linedef value supplied to `RGL_LowerTextureMid`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
front | dynamic | — | Front value supplied to `RGL_LowerTextureMid`. |
back | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
lumpnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
idx | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
linedef | dynamic | — | Linedef value supplied to `RGL_MidTextureMid`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
front | dynamic | — | Front value supplied to `RGL_MidTextureMid`. |
back | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
mo | dynamic | — | Map object affected by the operation. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
View source
# RGL_MobjExplosionLight
function RGL_MobjExplosionLight(mo, x, y, z)
Adds short, bright OpenGL lights for explosion animation states.
| Parameter | Type | Default | Description |
|---|
mo | dynamic | — | Map object affected by the operation. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
mo | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
d | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
linedef | dynamic | — | Linedef value supplied to `RGL_OppositeSide`. |
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
mo | dynamic | — | Map object affected by the operation. |
lump | dynamic | — | Lump value supplied to `RGL_PackNativeSprite`. |
flip | dynamic | — | Flip value supplied to `RGL_PackNativeSprite`. |
records | dynamic | — | Records value supplied to `RGL_PackNativeSprite`. |
recordIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
px | dynamic | — | Horizontal coordinate or vector component represented by px. |
py | dynamic | — | Vertical coordinate or vector component represented by py. |
ax | dynamic | — | Horizontal coordinate or vector component represented by ax. |
ay | dynamic | — | Vertical coordinate or vector component represented by ay. |
bx | dynamic | — | Horizontal coordinate or vector component represented by bx. |
by | dynamic | — | Vertical coordinate or vector component represented by by. |
cx | dynamic | — | Horizontal coordinate or vector component represented by cx. |
cy | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
slot | dynamic | — | Slot value supplied to `RGL_ProfileEnd`. |
start | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadGeomDepthQuad`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadGeomDepthTri`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadGeomFlatTri`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadGeomQuad`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadS32`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_ReadU32`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
currentTic | dynamic | — | Current tic value supplied to `RGL_RebuildScrollingArrayBatches`. |
currentMap | dynamic | — | Current map value supplied to `RGL_RebuildScrollingArrayBatches`. |
currentLevelTime | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
signature | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
flatnum | dynamic | — | Index identifying flat. |
View source
# RGL_ResolveTextureNum
inline function RGL_ResolveTextureNum(texnum)
Resolves Doom texture animation translation for OpenGL texture binding.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | Sec value supplied to `RGL_SectorNearFixedPoint`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
radius | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sec | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sg | dynamic | — | Sg value supplied to `RGL_SegTextureOffset`. |
opposite | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
thing | dynamic | — | World object affected by the operation. |
player | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sigMap | dynamic | — | Sig map value supplied to `RGL_SerializeGeometryCache`. |
sigSegs | dynamic | — | Sig segs value supplied to `RGL_SerializeGeometryCache`. |
sigLines | dynamic | — | Sig lines value supplied to `RGL_SerializeGeometryCache`. |
sigNodes | dynamic | — | Sig nodes value supplied to `RGL_SerializeGeometryCache`. |
sigSubsectors | dynamic | — | Sig subsectors value supplied to `RGL_SerializeGeometryCache`. |
sigSectorMotion | dynamic | — | Sig sector motion value supplied to `RGL_SerializeGeometryCache`. |
sigSides | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
base | dynamic | — | Base value supplied to `RGL_SetVertexLight`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
base | dynamic | — | Base value supplied to `RGL_SetVertexLightAlpha`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
alpha | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
side | dynamic | — | Map side affected by the operation. |
fallback | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
keys | dynamic | — | Keys value supplied to `RGL_SortBatchGroupsByKey`. |
groups | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
lump | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
base | dynamic | — | Base value supplied to `RGL_StaticVertexLit`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
View source
# RGL_StringStartsWith
function RGL_StringStartsWith(s, prefix)
Tests a short ASCII prefix without relying on optional string helpers.
| Parameter | Type | Default | Description |
|---|
s | dynamic | — | S value supplied to `RGL_StringStartsWith`. |
prefix | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
flatnum | dynamic | — | Index identifying flat. |
View source
# RGL_TextureIdForSpriteFuzzLump
function RGL_TextureIdForSpriteFuzzLump(lump)
Returns a neutral alpha-mask texture for shadow/fuzz sprite billboards.
| Parameter | Type | Default | Description |
|---|
lump | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
lump | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | Index identifying tex. |
View source
# RGL_TextureWidth
function RGL_TextureWidth(texnum)
Returns the translated texture's positive pixel width, with a 64-pixel fallback.
| Parameter | Type | Default | Description |
|---|
texnum | dynamic | — | Index identifying tex. |
View source
# RGL_TopTextureOrZero
inline function RGL_TopTextureOrZero(side)
Reads a sidedef's upper texture number, returning zero for missing data.
| Parameter | Type | Default | Description |
|---|
side | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
sigMap | dynamic | — | Sig map value supplied to `RGL_TryLoadGeometryCache`. |
sigSegs | dynamic | — | Sig segs value supplied to `RGL_TryLoadGeometryCache`. |
sigLines | dynamic | — | Sig lines value supplied to `RGL_TryLoadGeometryCache`. |
sigNodes | dynamic | — | Sig nodes value supplied to `RGL_TryLoadGeometryCache`. |
sigSubsectors | dynamic | — | Sig subsectors value supplied to `RGL_TryLoadGeometryCache`. |
sigSectorMotion | dynamic | — | Sig sector motion value supplied to `RGL_TryLoadGeometryCache`. |
sigSides | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
linedef | dynamic | — | Linedef value supplied to `RGL_UpperTextureMid`. |
texnum | dynamic | — | Index identifying tex. |
side | dynamic | — | Map side affected by the operation. |
front | dynamic | — | Front value supplied to `RGL_UpperTextureMid`. |
back | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
base | dynamic | — | Base value supplied to `RGL_VertexLit`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
q | dynamic | — | Q value supplied to `RGL_WallArrayBatchKey`. |
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.
| Parameter | Type | Default | Description |
|---|
vertices | dynamic | — | Vertices value supplied to `RGL_WriteGeomArrayVertex`. |
voff | dynamic | — | Voff value supplied to `RGL_WriteGeomArrayVertex`. |
texcoords | dynamic | — | Texcoords value supplied to `RGL_WriteGeomArrayVertex`. |
toff | dynamic | — | Toff value supplied to `RGL_WriteGeomArrayVertex`. |
colors | dynamic | — | Colors value supplied to `RGL_WriteGeomArrayVertex`. |
coff | dynamic | — | Coff value supplied to `RGL_WriteGeomArrayVertex`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
s | dynamic | — | S value supplied to `RGL_WriteGeomArrayVertex`. |
t | dynamic | — | T value supplied to `RGL_WriteGeomArrayVertex`. |
light | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomDepthQuad`. |
off | dynamic | — | Zero-based byte or element offset. |
q | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomDepthTri`. |
off | dynamic | — | Zero-based byte or element offset. |
t | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomFixed`. |
off | dynamic | — | Zero-based byte or element offset. |
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomFlatTri`. |
off | dynamic | — | Zero-based byte or element offset. |
t | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomInterleavedVertex`. |
off | dynamic | — | Zero-based byte or element offset. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
z | dynamic | — | Vertical world-space coordinate. |
s | dynamic | — | S value supplied to `RGL_WriteGeomInterleavedVertex`. |
t | dynamic | — | T value supplied to `RGL_WriteGeomInterleavedVertex`. |
light | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteGeomQuad`. |
off | dynamic | — | Zero-based byte or element offset. |
q | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
records | dynamic | — | Records value supplied to `RGL_WriteNativeBatchRecord`. |
index | dynamic | — | Zero-based element or table index. |
texid | dynamic | — | Texid value supplied to `RGL_WriteNativeBatchRecord`. |
batch | dynamic | — | Batch value supplied to `RGL_WriteNativeBatchRecord`. |
flags | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteS32`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `RGL_WriteU32`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
View source