MiniQuake2

src/miniquake2/renderer/opengl.ml

Provides miniquake2 renderer opengl facilities for this project.

Package
miniquake2.renderer.opengl
Reachable
Yes

Imports

Declarations

adoptClassicMapModel

function adoptClassicMapModel(binding, map, path)

Map adopt classic model.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
mapdynamic—map value consumed by this operation.
pathdynamic—Path of the file or directory used by the operation.

View source

allocateTextureRecord

function allocateTextureRecord(backend, name, role, generation, width, height)

Allocate texture record.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
namedynamic—Name of the affected item.
roledynamic—role value consumed by this operation.
generationdynamic—generation value consumed by this operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.

View source

appendClassicTransparentDraws

function appendClassicTransparentDraws(output, count, draws, drawCount, entity, entityAlpha, useSurfaceAlpha, viewOrigin)

Append classic transparent draws.

ParameterTypeDefaultDescription
outputdynamic—Output collection or buffer populated by the operation.
countdynamic—Number of items or units to process.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
entitydynamic—entity value consumed by this operation.
entityAlphadynamic—entityAlpha value consumed by this operation.
useSurfaceAlphadynamic—useSurfaceAlpha value consumed by this operation.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

backendDescription

function backendDescription(binding)

Return the backend description value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

beginOpenGlMd2Draw

function beginOpenGlMd2Draw(backend, skinAsset, entity, frame, entityIndex)

Begin open gl md 2 draw.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
skinAssetdynamic—skinAsset value consumed by this operation.
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.
entityIndexdynamic—Zero-based index of entity.

View source

bits

inline function bits(value)

Return the bits value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

brightness

function brightness(binding)

Return the post-composition brightness value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

buildOpenGlMd2ShadeRow

function buildOpenGlMd2ShadeRow(rowIndex)

anormtab.h is generated from Quake II's 162 bytedirs. Keep the compact source normals as the single truth and lazily materialize only the sixteen 648-byte rows. Values are rounded to the original table's hundredths.

ParameterTypeDefaultDescription
rowIndexdynamic—Zero-based index of row.

View source

classicBrushDistanceSquared

inline function classicBrushDistanceSquared(submission, viewOrigin)

Return the classic brush distance squared value.

ParameterTypeDefaultDescription
submissiondynamic—submission value consumed by this operation.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

classicBrushDynamicLightmaps

function classicBrushDynamicLightmaps(world, entity, plan, frame)

Return the classic brush dynamic lightmaps value.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
entitydynamic—entity value consumed by this operation.
plandynamic—plan value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

classicBrushDynamicLightmapsInto

function classicBrushDynamicLightmapsInto(world, entity, brushModel, plan, frame)

Populate retained per-submission light and lightmap prefixes for the live OpenGL path. This removes the periodic array/wrapper graph produced by each visible door and lift while preserving exact headless diagnostics below.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
entitydynamic—entity value consumed by this operation.
brushModeldynamic—brushModel value consumed by this operation.
plandynamic—plan value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

classicBrushFrameSignature

function classicBrushFrameSignature(brushFrame)

Return the classic brush frame signature value.

ParameterTypeDefaultDescription
brushFramedynamic—brushFrame value consumed by this operation.

View source

classicBrushLocalLights

function classicBrushLocalLights(entity, frame)

Return the classic brush local lights value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

classicBrushLocalLightsInto

function classicBrushLocalLightsInto(entity, frame, brushModel)

Transform dynamic lights into one mover's local space using retained capacity storage. Only frame.numDLights entries form the active prefix.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.
brushModeldynamic—brushModel value consumed by this operation.

View source

classicDrawCanCache

inline function classicDrawCanCache(draw)

Report whether classic draw can cache.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.

View source

classicDynamicLightmapForDraw

function classicDynamicLightmapForDraw(world, draw, lightStyles, dLights)

Rebuild one lightmap only when a style changed, a dynamic light affects the plane, or last frame's dynamic contribution must be removed.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
drawdynamic—draw value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.

View source

classicDynamicLightmapForDrawInto

function classicDynamicLightmapForDrawInto(world, draw, lightStyles, dLights, dLightCount, retained)

Rebuild one mover lightmap into a retained wrapper while observing only the active local-light prefix.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
drawdynamic—draw value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
dLightCountdynamic—Number of d light to process.
retaineddynamic—retained value consumed by this operation.

View source

classicInlineModelIndex

function classicInlineModelIndex(modelAsset)

Return the classic inline model index.

ParameterTypeDefaultDescription
modelAssetdynamic—modelAsset value consumed by this operation.

View source

classicRegistrationAssets

function classicRegistrationAssets(binding)

Return the CPU-side registration graph retained across a video mode change.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

classicTransparentDistance

inline function classicTransparentDistance(draw, entity, viewOrigin)

Return the classic transparent distance value.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.
entitydynamic—entity value consumed by this operation.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

classicTransparentFrameSignature

function classicTransparentFrameSignature(draws)

Return the classic transparent frame signature value.

ParameterTypeDefaultDescription
drawsdynamic—draws value consumed by this operation.

View source

clipOpenGlSkyPolygon

function clipOpenGlSkyPolygon(bounds, vertices, count, stage)

Compatibility wrapper used by focused geometry tests.

ParameterTypeDefaultDescription
boundsdynamic—bounds value consumed by this operation.
verticesdynamic—vertices value consumed by this operation.
countdynamic—Number of items or units to process.
stagedynamic—stage value consumed by this operation.

View source

clipOpenGlSkyPolygonScratch

function clipOpenGlSkyPolygonScratch(bounds, vertices, count, stage, scratch)

Exact managed port of ref_gl's six-plane ClipSkyPolygon. Sky surfaces are already triangle lists, so even the worst split remains well below 64 verts.

ParameterTypeDefaultDescription
boundsdynamic—bounds value consumed by this operation.
verticesdynamic—vertices value consumed by this operation.
countdynamic—Number of items or units to process.
stagedynamic—stage value consumed by this operation.
scratchdynamic—scratch value consumed by this operation.

View source

colorByte

inline function colorByte(value, shift)

Return the color byte value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
shiftdynamic—shift value consumed by this operation.

View source

createOpenGlRenderer

function createOpenGlRenderer(contextActive)

Create open gl renderer.

ParameterTypeDefaultDescription
contextActivedynamic—contextActive value consumed by this operation.

View source

createOpenGlSkyBounds

function createOpenGlSkyBounds()

Create open gl sky bounds.

View source

createOpenGlSkyVertexBuffer

function createOpenGlSkyVertexBuffer()

Create one fixed-capacity sky vertex buffer.

View source

DEG_TO_RAD

const DEG_TO_RAD = 1.74532925199433e-002

Defines the deg to rad constant used by the miniquake2 renderer opengl module.

View source

drawFadeRect

function drawFadeRect()

Draw fade rect.

View source

drawOpenGlBeam

function drawOpenGlBeam(backend, entity)

Draw open gl beam.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

drawOpenGlBrightness

function drawOpenGlBrightness(backend)

Apply a compositor-safe brightness fallback to the completed framebuffer. Modern Windows can accept SetDeviceGammaRamp while silently ignoring it in windowed/HDR composition. This exposure approximation keeps black anchored when brightening and uses an ordinary black blend when darkening, so the video-menu control always has an immediate visible runtime effect.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

drawOpenGlClassicBrushLightmaps

function drawOpenGlClassicBrushLightmaps(binding, submission, time)

Draw open gl classic brush lightmaps.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
submissiondynamic—submission value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

drawOpenGlClassicBrushOpaque

function drawOpenGlClassicBrushOpaque(binding, submission, frame)

Draw open gl classic brush opaque.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
submissiondynamic—submission value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

drawOpenGlClassicDraws

function drawOpenGlClassicDraws(binding, draws, drawCount, time, lightmap, entityFrame)

Draw open gl classic draws.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
timedynamic—time value consumed by this operation.
lightmapdynamic—lightmap value consumed by this operation.
entityFramedynamic—entityFrame value consumed by this operation.

View source

drawOpenGlClassicTransparentFrame

function drawOpenGlClassicTransparentFrame(binding, draws, drawCount, frame)

Draw open gl classic transparent frame.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
framedynamic—frame value consumed by this operation.

View source

drawOpenGlEntityPass

function drawOpenGlEntityPass(backend, frame, axes, translucentPass)

Draw open gl entity pass.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
axesdynamic—axes value consumed by this operation.
translucentPassdynamic—translucentPass value consumed by this operation.

View source

drawOpenGlMd2EntityFast

function drawOpenGlMd2EntityFast(backend, modelAsset, entity, frame, entityIndex)

Draw open gl md 2 entity fast.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
modelAssetdynamic—modelAsset value consumed by this operation.
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.
entityIndexdynamic—Zero-based index of entity.

View source

drawOpenGlMd2Plan

function drawOpenGlMd2Plan(backend, plan, entity)

Draw open gl md 2 plan.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
plandynamic—plan value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

drawOpenGlMd2Scalars

function drawOpenGlMd2Scalars(backend, skinAsset, glVertices, triangleCount, vertexCount, resultBounds, entity, frame)

Draw open gl md 2 scalars.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
skinAssetdynamic—skinAsset value consumed by this operation.
glVerticesdynamic—glVertices value consumed by this operation.
triangleCountdynamic—Number of triangle to process.
vertexCountdynamic—Number of vertex to process.
resultBoundsdynamic—resultBounds value consumed by this operation.
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

drawOpenGlMd2ShadowPass

function drawOpenGlMd2ShadowPass(backend, frame)

Keep alias lighting in one shader run, then submit the original optional GL_DrawAliasShadow behavior as a separate blended pass over cached MD2 VBOs.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

drawOpenGlNullEntity

function drawOpenGlNullEntity(entity)

Draw open gl null entity.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

drawOpenGlPendingClassicShadows

function drawOpenGlPendingClassicShadows(backend)

Draw the alias shadows only after the current frame's alias lighting pass has populated md2ShadowSpotZ. This removes the historical one-frame stale spot introduced by MiniQuake2's split world/entity submission API.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

drawOpenGlPolyBlend

function drawOpenGlPolyBlend(frame)

Draw open gl poly blend.

ParameterTypeDefaultDescription
framedynamic—frame value consumed by this operation.

View source

drawOpenGlSkyBox

function drawOpenGlSkyBox(binding, world, frame, draws, drawCount)

Draw open gl sky box.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.

View source

drawOpenGlSpriteEntity

function drawOpenGlSpriteEntity(backend, modelAsset, entity, axes)

Draw open gl sprite entity.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
modelAssetdynamic—modelAsset value consumed by this operation.
entitydynamic—entity value consumed by this operation.
axesdynamic—axes value consumed by this operation.

View source

drawParticles

function drawParticles(backend, frame, axes)

Draw particles.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
axesdynamic—axes value consumed by this operation.

View source

drawSolidRect

function drawSolidRect(backend, x, y, width, height, color)

Draw solid rect.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
colordynamic—color value consumed by this operation.

View source

drawTexturedRect

function drawTexturedRect(backend, asset, x, y, width, height)

Draw textured rect.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
assetdynamic—asset value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.

View source

drawTexturedSubRect

function drawTexturedSubRect(backend, asset, x, y, width, height, left, top, right, bottom)

Draw textured sub rect.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
assetdynamic—asset value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
leftdynamic—left value consumed by this operation.
topdynamic—top value consumed by this operation.
rightdynamic—right value consumed by this operation.
bottomdynamic—bottom value consumed by this operation.

View source

drawTiledRect

function drawTiledRect(backend, asset, x, y, width, height)

Draw tiled rect.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
assetdynamic—asset value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.

View source

emitClassicDraw

function emitClassicDraw(draw, lightmap, time)

Emit classic draw.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.
lightmapdynamic—lightmap value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

emitClassicVertex

function emitClassicVertex(draw, vertex, lightmap, time)

Emit classic vertex.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.
vertexdynamic—vertex value consumed by this operation.
lightmapdynamic—lightmap value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

emitOpenGlMd2Scalars

function emitOpenGlMd2Scalars(glVertices)

Emit open gl md 2 scalars.

ParameterTypeDefaultDescription
glVerticesdynamic—glVertices value consumed by this operation.

View source

emitOpenGlSkyVertex

function emitOpenGlSkyVertex(s, t, axis, texture)

Emit open gl sky vertex.

ParameterTypeDefaultDescription
sdynamic—s value consumed by this operation.
tdynamic—t value consumed by this operation.
axisdynamic—axis value consumed by this operation.
texturedynamic—texture value consumed by this operation.

View source

endOpenGlMd2Draw

function endOpenGlMd2Draw(drawState)

End open gl md 2 draw.

ParameterTypeDefaultDescription
drawStatedynamic—drawState value consumed by this operation.

View source

ensureOpenGlParticleTexture

function ensureOpenGlParticleTexture(backend)

Ensure open gl particle texture.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

ensureOpenGlPictureTexture

function ensureOpenGlPictureTexture(backend, asset)

Ensure open gl picture texture.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
assetdynamic—asset value consumed by this operation.

View source

ensureOpenGlRawTexture

function ensureOpenGlRawTexture(backend)

Ensure open gl raw texture.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

ensureOpenGlSkyClipScratch

function ensureOpenGlSkyClipScratch()

Lazily create the retained clipping workspace. Product registration calls this before gameplay whenever a map owns sky surfaces.

View source

findTextureRecord

function findTextureRecord(backend, id)

Find texture record.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
iddynamic—Stable identifier of the affected item.

View source

flushOpenGlPendingClassicAlpha

function flushOpenGlPendingClassicAlpha()

Finish stock's tail ordering after entities and particles. The actual alpha draw routine is declared later with the other ClassicWorld helpers.

View source

getRefAPI

function getRefAPI(imports, contextActive)

Return ref api.

ParameterTypeDefaultDescription
importsdynamic—imports value consumed by this operation.
contextActivedynamic—contextActive value consumed by this operation.

View source

GL_ALPHA_TEST

const GL_ALPHA_TEST = 3008

Defines the gl alpha test constant used by the miniquake2 renderer opengl module.

View source

GL_BACK

const GL_BACK = 1029

Defines the gl back constant used by the miniquake2 renderer opengl module.

View source

GL_BLEND

const GL_BLEND = 3042

Defines the gl blend constant used by the miniquake2 renderer opengl module.

View source

GL_CLAMP

const GL_CLAMP = 10496

Defines the gl clamp constant used by the miniquake2 renderer opengl module.

View source

GL_COLOR_BUFFER_BIT

const GL_COLOR_BUFFER_BIT = 16384

Defines the gl color buffer bit constant used by the miniquake2 renderer opengl module.

View source

GL_CULL_FACE

const GL_CULL_FACE = 2884

Defines the gl cull face constant used by the miniquake2 renderer opengl module.

View source

GL_DEPTH_BUFFER_BIT

const GL_DEPTH_BUFFER_BIT = 256

Defines the gl depth buffer bit constant used by the miniquake2 renderer opengl module.

View source

GL_DEPTH_TEST

const GL_DEPTH_TEST = 2929

Defines the gl depth test constant used by the miniquake2 renderer opengl module.

View source

GL_DST_COLOR

const GL_DST_COLOR = 774

Defines the gl dst color constant used by the miniquake2 renderer opengl module.

View source

GL_EQUAL

const GL_EQUAL = 514

Defines the gl equal constant used by the miniquake2 renderer opengl module.

View source

GL_FRONT

const GL_FRONT = 1028

Defines the gl front constant used by the miniquake2 renderer opengl module.

View source

GL_GREATER

const GL_GREATER = 516

Defines the gl greater constant used by the miniquake2 renderer opengl module.

View source

GL_LEQUAL

const GL_LEQUAL = 515

Defines the gl lequal constant used by the miniquake2 renderer opengl module.

View source

GL_LESS

const GL_LESS = 513

Defines the gl less constant used by the miniquake2 renderer opengl module.

View source

GL_LINEAR

const GL_LINEAR = 9729

Defines the gl linear constant used by the miniquake2 renderer opengl module.

View source

GL_LINEAR_MIPMAP_NEAREST

const GL_LINEAR_MIPMAP_NEAREST = 9985

Defines the gl linear mipmap nearest constant used by the miniquake2 renderer opengl module.

View source

GL_LINES

const GL_LINES = 1

Defines the gl lines constant used by the miniquake2 renderer opengl module.

View source

GL_MODELVIEW

const GL_MODELVIEW = 5888

Defines the gl modelview constant used by the miniquake2 renderer opengl module.

View source

GL_MODULATE

const GL_MODULATE = 8448

Defines the gl modulate constant used by the miniquake2 renderer opengl module.

View source

GL_ONE

const GL_ONE = 1

Defines the gl one constant used by the miniquake2 renderer opengl module.

View source

GL_ONE_MINUS_SRC_ALPHA

const GL_ONE_MINUS_SRC_ALPHA = 771

Defines the gl one minus src alpha constant used by the miniquake2 renderer opengl module.

View source

GL_POINTS

const GL_POINTS = 0

Defines the gl points constant used by the miniquake2 renderer opengl module.

View source

GL_PROJECTION

const GL_PROJECTION = 5889

Defines the gl projection constant used by the miniquake2 renderer opengl module.

View source

GL_QUADS

const GL_QUADS = 7

Defines the gl quads constant used by the miniquake2 renderer opengl module.

View source

GL_RENDERER

const GL_RENDERER = 7937

Defines the gl renderer constant used by the miniquake2 renderer opengl module.

View source

GL_REPEAT

const GL_REPEAT = 10497

Defines the gl repeat constant used by the miniquake2 renderer opengl module.

View source

GL_RGBA

const GL_RGBA = 6408

Defines the gl rgba constant used by the miniquake2 renderer opengl module.

View source

GL_SRC_ALPHA

const GL_SRC_ALPHA = 770

Defines the gl src alpha constant used by the miniquake2 renderer opengl module.

View source

GL_SRC_COLOR

const GL_SRC_COLOR = 768

Defines the gl src color constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_2D

const GL_TEXTURE_2D = 3553

Defines the gl texture 2 d constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_ENV

const GL_TEXTURE_ENV = 8960

Defines the gl texture env constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_ENV_MODE

const GL_TEXTURE_ENV_MODE = 8704

Defines the gl texture env mode constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_MAG_FILTER

const GL_TEXTURE_MAG_FILTER = 10240

Defines the gl texture mag filter constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_MIN_FILTER

const GL_TEXTURE_MIN_FILTER = 10241

Defines the gl texture min filter constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_WRAP_S

const GL_TEXTURE_WRAP_S = 10242

Defines the gl texture wrap s constant used by the miniquake2 renderer opengl module.

View source

GL_TEXTURE_WRAP_T

const GL_TEXTURE_WRAP_T = 10243

Defines the gl texture wrap t constant used by the miniquake2 renderer opengl module.

View source

GL_TRIANGLE_FAN

const GL_TRIANGLE_FAN = 6

Defines the gl triangle fan constant used by the miniquake2 renderer opengl module.

View source

GL_TRIANGLE_STRIP

const GL_TRIANGLE_STRIP = 5

Defines the gl triangle strip constant used by the miniquake2 renderer opengl module.

View source

GL_TRIANGLES

const GL_TRIANGLES = 4

Defines the gl triangles constant used by the miniquake2 renderer opengl module.

View source

GL_UNSIGNED_BYTE

const GL_UNSIGNED_BYTE = 5121

Defines the gl unsigned byte constant used by the miniquake2 renderer opengl module.

View source

GL_VENDOR

const GL_VENDOR = 7936

Defines the gl vendor constant used by the miniquake2 renderer opengl module.

View source

GL_VERSION

const GL_VERSION = 7938

Defines the gl version constant used by the miniquake2 renderer opengl module.

View source

GL_ZERO

const GL_ZERO = 0

Defines the gl zero constant used by the miniquake2 renderer opengl module.

View source

miniquake2.renderer.opengl.GlTextureRecord struct

handedness

function handedness(binding)

Return the handedness value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

lastShadowEntities

function lastShadowEntities(binding)

Return the last shadow entities value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

lightLevel

function lightLevel(binding)

Return the light level value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

miniquake2.renderer.opengl.Md2DrawState struct

miniquake2.renderer.opengl.Md2EntityPlan struct

md2EntityShade

function md2EntityShade(binding, frame, entity)

Return the md 2 entity shade value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
framedynamic—frame value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

md2EntityVisible

function md2EntityVisible(binding, entity)

Report whether md 2 entity visible.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

miniquake2.renderer.opengl.Md2LightCacheEntry struct

md2ModelFrameBounds

function md2ModelFrameBounds(binding, modelHandle, frameIndex)

Return the md 2 model frame bounds.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
modelHandledynamic—modelHandle value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.

View source

md2ModelPitch

function md2ModelPitch(angle)

Return the md 2 model pitch value.

ParameterTypeDefaultDescription
angledynamic—angle value consumed by this operation.

View source

md2ShadeRow

function md2ShadeRow(binding, yaw)

Return the md 2 shade row value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
yawdynamic—yaw value consumed by this operation.

View source

md2ShadowEligible

function md2ShadowEligible(binding, entity)

Return the md 2 shadow eligible value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

md2ShadowLightHeight

function md2ShadowLightHeight(entity, spotZ)

Return the md 2 shadow light height value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
spotZdynamic—spotZ value consumed by this operation.

View source

md2ShadowVectorX

function md2ShadowVectorX(yaw)

Return the md 2 shadow vector x value.

ParameterTypeDefaultDescription
yawdynamic—yaw value consumed by this operation.

View source

md2ShadowVectorY

function md2ShadowVectorY(yaw)

Return the md 2 shadow vector y value.

ParameterTypeDefaultDescription
yawdynamic—yaw value consumed by this operation.

View source

miniquake2.renderer.opengl.Md2SubmitStats struct

OPEN_GL_MAX_TEXTURE_ID

const OPEN_GL_MAX_TEXTURE_ID = 16383

Native renderer texture identifiers occupy 14 bits. Keep a dense retained

View source

OPEN_GL_SKY_CLIP_CAPACITY

const OPEN_GL_SKY_CLIP_CAPACITY = 72

Defines the open gl sky clip capacity constant used by the miniquake2 renderer opengl module.

View source

OPEN_GL_SKY_SOURCE_CAPACITY

const OPEN_GL_SKY_SOURCE_CAPACITY = 66

ref_gl accepts at most 66 source vertices. Each of the six clip planes can

View source

openGlAppActivate

function openGlAppActivate(activate)

Open gl app activate.

ParameterTypeDefaultDescription
activatedynamic—activate value consumed by this operation.

View source

openGlBackendSlot

openGlBackendSlot

Mutating a package-owned holder is reliable across the self-hosted full

View source

miniquake2.renderer.opengl.OpenGlBackendSlot struct

openGlBatchDrawsEqual

inline function openGlBatchDrawsEqual(first, second)

Report whether open gl batch draws equal.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.

View source

openGlBatchDrawsEqualPrefix

inline function openGlBatchDrawsEqualPrefix(first, second, count)

Compare an exact retained batch with a capacity-sized visible prefix.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.
countdynamic—Number of items or units to process.

View source

openGlBeamScalars

function openGlBeamScalars(entity)

Open gl beam scalars.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

openGlBeginFrame

function openGlBeginFrame(cameraSeparation)

Open gl begin frame.

ParameterTypeDefaultDescription
cameraSeparationdynamic—cameraSeparation value consumed by this operation.

View source

openGlBeginRegistration

function openGlBeginRegistration(mapName)

Open gl begin registration.

ParameterTypeDefaultDescription
mapNamedynamic—mapName value consumed by this operation.

View source

openGlBrushSubmissionScratch

openGlBrushSubmissionScratch

Stores module-wide open gl brush submission scratch state for the miniquake2 renderer opengl module.

View source

openGlCinematicSetPalette

function openGlCinematicSetPalette(palette)

Open gl cinematic set palette.

ParameterTypeDefaultDescription
palettedynamic—palette value consumed by this operation.

View source

openGlClassicTextureCoordinateScratch

openGlClassicTextureCoordinateScratch

Stores module-wide open gl classic texture coordinate scratch state for the miniquake2 renderer opengl module.

View source

openGlDrawChar

function openGlDrawChar(x, y, character)

Open gl draw char.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
characterdynamic—character value consumed by this operation.

View source

openGlDrawFadeScreen

function openGlDrawFadeScreen()

Open gl draw fade screen.

View source

openGlDrawFill

function openGlDrawFill(x, y, width, height, color)

Open gl draw fill.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
colordynamic—color value consumed by this operation.

View source

openGlDrawGetPicSize

function openGlDrawGetPicSize(name)

Open gl draw get pic size.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

openGlDrawPic

function openGlDrawPic(x, y, name)

Open gl draw pic.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
namedynamic—Name of the affected item.

View source

openGlDrawStretchPic

function openGlDrawStretchPic(x, y, width, height, name)

Open gl draw stretch pic.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
namedynamic—Name of the affected item.

View source

openGlDrawStretchRaw

function openGlDrawStretchRaw(x, y, width, height, columns, rows, data)

Open gl draw stretch raw.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
columnsdynamic—columns value consumed by this operation.
rowsdynamic—rows value consumed by this operation.
datadynamic—Input data consumed by the operation.

View source

openGlDrawTileClear

function openGlDrawTileClear(x, y, width, height, name)

Open gl draw tile clear.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
namedynamic—Name of the affected item.

View source

openGlEndFrame

function openGlEndFrame()

Open gl end frame.

View source

openGlEndRegistration

function openGlEndRegistration()

Open gl end registration.

View source

miniquake2.renderer.opengl.OpenGlFileImports struct

openGlFrameSlot

openGlFrameSlot

Stores module-wide open gl frame slot state for the miniquake2 renderer opengl module.

View source

miniquake2.renderer.opengl.OpenGlFrameSlot struct

openGlLoadGamePalette

function openGlLoadGamePalette(backend)

Open gl load game palette.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

openGlMakeExports

function openGlMakeExports()

Open gl make exports.

View source

openGlMd2EntityInFrustum

inline function openGlMd2EntityInFrustum(modelAsset, entity, frame)

Conservatively cull alias models with the union radius of the current and previous poses. Weapon models deliberately bypass the world frustum, as in the original R_CullAliasModel call site.

ParameterTypeDefaultDescription
modelAssetdynamic—modelAsset value consumed by this operation.
entitydynamic—entity value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

openGlMd2EntityVisible

inline function openGlMd2EntityVisible(backend, entity)

Report whether open gl md 2 entity visible.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

openGlMd2FrameShade

function openGlMd2FrameShade(backend, frame, entity)

Open gl md 2 frame shade.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

openGlMd2FrameShadeComponents

function openGlMd2FrameShadeComponents(backend, frame, entity)

Open gl md 2 frame shade components for diagnostic callers without a stable live RefDef slot.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

openGlMd2FrameShadeComponentsAt

function openGlMd2FrameShadeComponentsAt(backend, frame, entity, entityIndex)

Open gl md 2 frame shade components.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
entitydynamic—entity value consumed by this operation.
entityIndexdynamic—Zero-based index of entity.

View source

openGlMd2GeometryState

inline function openGlMd2GeometryState(frameIndex, oldFrameIndex)

Return the immutable GPU cache state for one MD2 frame pair.

ParameterTypeDefaultDescription
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.

View source

openGlMd2ModelPitch

inline function openGlMd2ModelPitch(angle)

R_DrawAliasModel negates PITCH before calling R_RotateForEntity (the original source's "sigh" workaround). R_RotateForEntity negates it again, so alias models use a positive pitch rotation while brush models do not.

ParameterTypeDefaultDescription
angledynamic—angle value consumed by this operation.

View source

openGlMd2NormalVectors

function openGlMd2NormalVectors(backend)

Open gl md 2 normal vectors.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

openGlMd2Shade

function openGlMd2Shade(entity, time)

Open gl md 2 shade.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

openGlMd2ShadeColor

function openGlMd2ShadeColor(entity, time, rdFlags, baseColor)

Open gl md 2 shade color.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
timedynamic—time value consumed by this operation.
rdFlagsdynamic—rdFlags value consumed by this operation.
baseColordynamic—baseColor value consumed by this operation.

View source

openGlMd2ShadeComponents

function openGlMd2ShadeComponents(entity, time, rdFlags, baseColor)

Open gl md 2 shade components.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
timedynamic—time value consumed by this operation.
rdFlagsdynamic—rdFlags value consumed by this operation.
baseColordynamic—baseColor value consumed by this operation.

View source

openGlMd2ShadeRow

function openGlMd2ShadeRow(backend, yaw)

Open gl md 2 shade row.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
yawdynamic—yaw value consumed by this operation.

View source

openGlMd2ShadeRowIndex

inline function openGlMd2ShadeRowIndex(yaw)

Open gl md 2 shade row index.

ParameterTypeDefaultDescription
yawdynamic—yaw value consumed by this operation.

View source

openGlMd2ShadowEligible

inline function openGlMd2ShadowEligible(backend, entity)

Open gl md 2 shadow eligible.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

openGlMd2ShadowLightHeight

inline function openGlMd2ShadowLightHeight(entity, spotZ)

Open gl md 2 shadow light height.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
spotZdynamic—spotZ value consumed by this operation.

View source

openGlMd2ShadowVectorX

inline function openGlMd2ShadowVectorX(yaw)

Open gl md 2 shadow vector x.

ParameterTypeDefaultDescription
yawdynamic—yaw value consumed by this operation.

View source

openGlMd2ShadowVectorY

inline function openGlMd2ShadowVectorY(yaw)

Open gl md 2 shadow vector y.

ParameterTypeDefaultDescription
yawdynamic—yaw value consumed by this operation.

View source

openGlMd2StaticGeometryPass

inline function openGlMd2StaticGeometryPass(frameIndex, oldFrameIndex, shell)

Power-shell vertices depend on backLerp and therefore cannot reuse the immutable native frame-pair cache used by ordinary MD2 geometry.

ParameterTypeDefaultDescription
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
shelldynamic—shell value consumed by this operation.

View source

openGlMd2StaticLightSample

function openGlMd2StaticLightSample(backend, frame, entity, entityIndex)

Return a cached static BSP sample for one live RefDef entity slot.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.
entitydynamic—entity value consumed by this operation.
entityIndexdynamic—Zero-based index of entity.

View source

openGlPackMd2Shade

inline function openGlPackMd2Shade(color)

Open gl pack md 2 shade.

ParameterTypeDefaultDescription
colordynamic—color value consumed by this operation.

View source

openGlPaletteColor

inline function openGlPaletteColor(palette, index)

Open gl palette color.

ParameterTypeDefaultDescription
palettedynamic—palette value consumed by this operation.
indexdynamic—Zero-based index of the affected item.

View source

openGlParticlePixels

function openGlParticlePixels()

Open gl particle pixels.

View source

openGlParticleRecords

openGlParticleRecords

Stores module-wide open gl particle records state for the miniquake2 renderer opengl module.

View source

openGlPendingClassicPasses

openGlPendingClassicPasses

Stores module-wide open gl pending classic passes state for the miniquake2 renderer opengl module.

View source

miniquake2.renderer.opengl.OpenGlPendingClassicPasses struct

openGlPolyBlendColor

function openGlPolyBlendColor(blend)

ref_gl copies RefDef.blend into v_blend and overlays it after the complete 3-D scene. This carries damage flashes, underwater tint and powerup color shifts; retaining the field without drawing it leaves all three invisible.

ParameterTypeDefaultDescription
blenddynamic—blend value consumed by this operation.

View source

miniquake2.renderer.opengl.OpenGlRawFrame struct

openGlRegisterModel

function openGlRegisterModel(name)

Open gl register model.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

openGlRegisterPic

function openGlRegisterPic(name)

Open gl register pic.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

openGlRegisterSkin

function openGlRegisterSkin(name)

Open gl register skin.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

openGlRendererInit

function openGlRendererInit(hinstance, wndproc)

Open gl renderer init.

ParameterTypeDefaultDescription
hinstancedynamic—hinstance value consumed by this operation.
wndprocdynamic—wndproc value consumed by this operation.

View source

openGlRendererShutdown

function openGlRendererShutdown()

Open gl renderer shutdown.

View source

openGlRenderFrame

function openGlRenderFrame(frame)

Open gl render frame.

ParameterTypeDefaultDescription
framedynamic—frame value consumed by this operation.

View source

openGlRequireInitialized

function openGlRequireInitialized(backend, operation)

The full product graph is large enough to expose a closure-layout bug in the current self-hosted compiler. The production renderer therefore publishes capture-free top-level callbacks and resolves its one active backend through the package-owned slot. This also keeps the deterministic command recorder out of the real-time path.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
operationdynamic—operation value consumed by this operation.

View source

openGlSetSky

function openGlSetSky(name, rotate, axis)

Open gl set sky.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.
rotatedynamic—rotate value consumed by this operation.
axisdynamic—axis value consumed by this operation.

View source

openGlShadeByte

inline function openGlShadeByte(component)

Open gl shade byte.

ParameterTypeDefaultDescription
componentdynamic—component value consumed by this operation.

View source

openGlSkyBounds

function openGlSkyBounds(draws, viewOrigin)

Compatibility wrapper for exact diagnostic arrays.

ParameterTypeDefaultDescription
drawsdynamic—draws value consumed by this operation.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

openGlSkyBoundsPrefix

function openGlSkyBoundsPrefix(draws, drawCount, viewOrigin)

Open gl sky bounds.

ParameterTypeDefaultDescription
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

openGlSkyClipDistance

function openGlSkyClipDistance(value, stage)

Open gl sky clip distance.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
stagedynamic—stage value consumed by this operation.

View source

miniquake2.renderer.opengl.OpenGlSkyClipScratch struct

openGlSkyScratchSlot

openGlSkyScratchSlot

Stores module-wide open gl sky scratch slot state for the miniquake2 renderer opengl module.

View source

miniquake2.renderer.opengl.OpenGlSkyScratchSlot struct

miniquake2.renderer.opengl.OpenGlState struct

openGlViewAxes

function openGlViewAxes(viewAngles)

Open gl view axes.

ParameterTypeDefaultDescription
viewAnglesdynamic—viewAngles value consumed by this operation.

View source

miniquake2.renderer.opengl.OpenGlViewAxes struct

picturePixels

function picturePixels(asset)

Return the picture pixels value.

ParameterTypeDefaultDescription
assetdynamic—asset value consumed by this operation.

View source

pictureUploadPixels

function pictureUploadPixels(asset)

Return the picture upload pixels value.

ParameterTypeDefaultDescription
assetdynamic—asset value consumed by this operation.

View source

precacheOpenGlClassicGeometry

function precacheOpenGlClassicGeometry(world)

Open precache gl classic geometry.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.

View source

prepareClassicBrushFrame

function prepareClassicBrushFrame(binding, world, frame)

Product-graph-facing CPU plan. It consumes the same model handles emitted by client asset registration, but never reparses or expands the adopted BSP.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

prepareClassicTransparentFrame

function prepareClassicTransparentFrame(worldPlan, brushFrame, frame)

Compatibility wrapper returning an exact diagnostic array.

ParameterTypeDefaultDescription
worldPlandynamic—worldPlan value consumed by this operation.
brushFramedynamic—brushFrame value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

prepareClassicTransparentFramePrefix

function prepareClassicTransparentFramePrefix(worldPlan, brushFrame, frame)

Prepare classic transparent frame.

ParameterTypeDefaultDescription
worldPlandynamic—worldPlan value consumed by this operation.
brushFramedynamic—brushFrame value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

prepareClassicWorld

function prepareClassicWorld(binding, map, loadFile, lightStyles, entityFrame, modulate)

Prepare classic world.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
mapdynamic—map value consumed by this operation.
loadFiledynamic—loadFile value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
entityFramedynamic—entityFrame value consumed by this operation.
modulatedynamic—modulate value consumed by this operation.

View source

prepareMd2Entity

function prepareMd2Entity(binding, entity)

Prepare md 2 entity.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

prepareOpenGlClassicDraw

function prepareOpenGlClassicDraw(draw, pass, lightmap)

Prepare open gl classic draw.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.
passdynamic—pass value consumed by this operation.
lightmapdynamic—lightmap value consumed by this operation.

View source

prepareOpenGlClassicMultitextureDraw

function prepareOpenGlClassicMultitextureDraw(draw)

Prepare open gl classic multitexture draw.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.

View source

prepareOpenGlMd2Entity

function prepareOpenGlMd2Entity(backend, entity)

Prepare open gl md 2 entity.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

prepareOpenGlRawFrame

function prepareOpenGlRawFrame(columns, rows, data, palette, reusable)

Prepare open gl raw frame.

ParameterTypeDefaultDescription
columnsdynamic—columns value consumed by this operation.
rowsdynamic—rows value consumed by this operation.
datadynamic—Input data consumed by the operation.
palettedynamic—palette value consumed by this operation.
reusabledynamic—reusable value consumed by this operation.

View source

prepareProductRefDef

function prepareProductRefDef(frame)

Normalize the mutable effect handoff counts and validate its constant-time product contract. A zero client viewport is a normal minimized-window state, not a fatal renderer error.

ParameterTypeDefaultDescription
framedynamic—frame value consumed by this operation.

View source

projectOpenGlSkyPolygon

function projectOpenGlSkyPolygon(bounds, vertices, count)

Project open gl sky polygon.

ParameterTypeDefaultDescription
boundsdynamic—bounds value consumed by this operation.
verticesdynamic—vertices value consumed by this operation.
countdynamic—Number of items or units to process.

View source

pushOpenGlClassicBrush

function pushOpenGlClassicBrush(entity)

Open push gl classic brush.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

recordClassicDeferredUploads

function recordClassicDeferredUploads(stats, uploaded)

Add uploads completed after submitClassicWorld returned to its retained mutable diagnostic record.

ParameterTypeDefaultDescription
statsdynamic—stats value consumed by this operation.
uploadeddynamic—uploaded value consumed by this operation.

View source

registerMd2Model

function registerMd2Model(binding, name, loadFile)

Callback-backed registration for createOpenGlRenderer(), whose refimport is intentionally void. getRefAPI() users can use exports.RegisterModel.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
namedynamic—Name of the affected item.
loadFiledynamic—loadFile value consumed by this operation.

View source

releaseClassicWorld

function releaseClassicWorld(binding, world)

Release classic world.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.

View source

releaseOpenGlTextureRecord

function releaseOpenGlTextureRecord(backend, record)

Release open gl texture record.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
recorddynamic—record value consumed by this operation.

View source

releaseOpenGlTextureRecords

function releaseOpenGlTextureRecords(backend)

Release open gl texture records.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.

View source

resetOpenGlSkyBounds

function resetOpenGlSkyBounds(bounds)

Reset the persistent sky bounds for a new view.

ParameterTypeDefaultDescription
boundsdynamic—bounds value consumed by this operation.

View source

resolveOpenGlMd2Skin

function resolveOpenGlMd2Skin(backend, modelAsset, entity)

Resolve open gl md 2 skin.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
modelAssetdynamic—modelAsset value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

restoreClassicRegistration

function restoreClassicRegistration(binding, world, registrationAssets)

Rebind an intact CPU-side world and asset graph to a replacement OpenGL context. Resolution/fullscreen changes invalidate native texture names, but do not require reparsing the BSP, WAL, PCX, MD2, SP2 or WAV resources.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.
registrationAssetsdynamic—registrationAssets value consumed by this operation.

View source

setBrightness

function setBrightness(binding, brightness)

Set the post-composition brightness/gamma value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
brightnessdynamic—brightness value consumed by this operation.

View source

setContextActive

function setContextActive(binding, active)

Report whether set context active.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
activedynamic—active value consumed by this operation.

View source

setHandedness

function setHandedness(binding, hand)

Set handedness.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
handdynamic—hand value consumed by this operation.

View source

setOpenGlSkyScratchVertex

inline function setOpenGlSkyScratchVertex(buffer, index, x, y, z)

Copy coordinates into one retained vertex object.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
indexdynamic—Zero-based index of the affected item.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
zdynamic—z value consumed by this operation.

View source

setShadows

function setShadows(binding, enabled)

Set shadows.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
enableddynamic—enabled value consumed by this operation.

View source

setup2d

function setup2d()

Return the setup 2 d value.

View source

setup3d

function setup3d(frame)

Return the setup 3 d value.

ParameterTypeDefaultDescription
framedynamic—frame value consumed by this operation.

View source

shadows

function shadows(binding)

Return the shadows value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.

View source

sortClassicBrushSubmissionPrefix

function sortClassicBrushSubmissionPrefix(submissions, count, viewOrigin)

Sort classic brush submission prefix.

ParameterTypeDefaultDescription
submissionsdynamic—submissions value consumed by this operation.
countdynamic—Number of items or units to process.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

sortClassicBrushSubmissions

function sortClassicBrushSubmissions(submissions, viewOrigin)

Sort classic brush submissions.

ParameterTypeDefaultDescription
submissionsdynamic—submissions value consumed by this operation.
viewOrigindynamic—viewOrigin value consumed by this operation.

View source

sortClassicTransparentDraws

function sortClassicTransparentDraws(draws)

Sort classic transparent draws.

ParameterTypeDefaultDescription
drawsdynamic—draws value consumed by this operation.

View source

sortClassicTransparentDrawsInPlace

function sortClassicTransparentDrawsInPlace(draws, count)

Sort classic transparent draws in place.

ParameterTypeDefaultDescription
drawsdynamic—draws value consumed by this operation.
countdynamic—Number of items or units to process.

View source

submitClassicWorld

function submitClassicWorld(binding, world, frame)

Product BSP handoff. Geometry debug remains independent via submitTriangleMesh. This path follows the classic order: lit opaque base, multiplicative lightmaps, turbulent water, sky portals, then sorted alpha.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

submitMd2Entity

function submitMd2Entity(binding, entity)

Explicit handoff for tools. Product RefDef entities are submitted automatically by RenderFrame when entity.model is a current MD2 handle.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
entitydynamic—entity value consumed by this operation.

View source

submitOpenGlClassicDraw

function submitOpenGlClassicDraw(draw, lightmap, time)

Submit open gl classic draw.

ParameterTypeDefaultDescription
drawdynamic—draw value consumed by this operation.
lightmapdynamic—lightmap value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

submitOpenGlClassicMultitexture

function submitOpenGlClassicMultitexture(binding, draws, drawCount, time)

Submit open gl classic multitexture.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
timedynamic—time value consumed by this operation.

View source

submitOpenGlRefDefMd2Entities

function submitOpenGlRefDefMd2Entities(backend, frame)

Submit open gl ref def md 2 entities.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
framedynamic—frame value consumed by this operation.

View source

submitTriangleMesh

function submitTriangleMesh(binding, mesh, origin, angles, red, green, blue, alpha)

Independent wireframe/geometry-debug path for BSP38 fan geometry and interpolated MD2 meshes produced by renderer.geometry.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
meshdynamic—mesh value consumed by this operation.
origindynamic—origin value consumed by this operation.
anglesdynamic—angles value consumed by this operation.
reddynamic—red value consumed by this operation.
greendynamic—green value consumed by this operation.
bluedynamic—blue value consumed by this operation.
alphadynamic—alpha value consumed by this operation.

View source

updateClassicWorldLightmaps

function updateClassicWorldLightmaps(binding, world, draws, drawCount, frame)

Refresh visible world lightmap rectangles before their opaque base/lightmap pass. Dynamic lights are already in world space, unlike inline brush lights.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
worlddynamic—world value consumed by this operation.
drawsdynamic—draws value consumed by this operation.
drawCountdynamic—Number of draw to process.
framedynamic—frame value consumed by this operation.

View source

updateOpenGlMd2LightStyleEpoch

function updateOpenGlMd2LightStyleEpoch(backend, lightStyles)

Advance the renderer-owned light-style epoch only when RGB content changes. The client mutates its fixed style table at 10 Hz, so array identity alone cannot invalidate cached static point samples.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.

View source

uploadClassicBrushLightmap

function uploadClassicBrushLightmap(binding, brushLightmap)

Return the upload classic brush lightmap value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
brushLightmapdynamic—brushLightmap value consumed by this operation.

View source

uploadClassicLightmapPixels

function uploadClassicLightmapPixels(binding, draw, rgbaPixels)

Upload one dirty lightmap rectangle without requiring a per-frame wrapper.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
drawdynamic—draw value consumed by this operation.
rgbaPixelsdynamic—rgbaPixels value consumed by this operation.

View source

uploadClassicTexture

function uploadClassicTexture(binding, texture)

Return the upload classic texture value.

ParameterTypeDefaultDescription
bindingdynamic—binding value consumed by this operation.
texturedynamic—texture value consumed by this operation.

View source

uploadOpenGlMipChain

function uploadOpenGlMipChain(width, height, rgba)

Upload a complete RGBA mip chain during registration. Keeping mip generation inside this renderer helper restores stock sampling without gameplay heap use.

ParameterTypeDefaultDescription
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
rgbadynamic—rgba value consumed by this operation.

View source

uploadPicture

function uploadPicture(backend, asset)

Return the upload picture value.

ParameterTypeDefaultDescription
backenddynamic—backend value consumed by this operation.
assetdynamic—asset value consumed by this operation.

View source

writeOpenGlBatchU32

inline function writeOpenGlBatchU32(buffer, offset, value)

Write open gl batch u 32.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

writeOpenGlMultitextureRecord

inline function writeOpenGlMultitextureRecord(buffer, index, draw, baseTextureId, lightmapTextureId)

Write open gl multitexture record.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
indexdynamic—Zero-based index of the affected item.
drawdynamic—draw value consumed by this operation.
baseTextureIddynamic—Identifier of base texture.
lightmapTextureIddynamic—Identifier of lightmap texture.

View source

writeOpenGlParticleRecord

function writeOpenGlParticleRecord(buffer, index, packed, alpha, origin)

Write open gl particle record.

ParameterTypeDefaultDescription
bufferdynamic—Buffer that receives or supplies the operation data.
indexdynamic—Zero-based index of the affected item.
packeddynamic—packed value consumed by this operation.
alphadynamic—alpha value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source