Files
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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
map | dynamic | — | map value consumed by this operation. |
path | dynamic | — | Path of the file or directory used by the operation. |
View source
# allocateTextureRecord
function allocateTextureRecord(backend, name, role, generation, width, height)
Allocate texture record.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
role | dynamic | — | role value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
output | dynamic | — | Output collection or buffer populated by the operation. |
count | dynamic | — | Number of items or units to process. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
entity | dynamic | — | entity value consumed by this operation. |
entityAlpha | dynamic | — | entityAlpha value consumed by this operation. |
useSurfaceAlpha | dynamic | — | useSurfaceAlpha value consumed by this operation. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# backendDescription
function backendDescription(binding)
Return the backend description value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
View source
# beginOpenGlMd2Draw
function beginOpenGlMd2Draw(backend, skinAsset, entity, frame, entityIndex)
Begin open gl md 2 draw.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
skinAsset | dynamic | — | skinAsset value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entityIndex | dynamic | — | Zero-based index of entity. |
View source
# bits
inline function bits(value)
Return the bits value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# brightness
function brightness(binding)
Return the post-composition brightness value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
rowIndex | dynamic | — | Zero-based index of row. |
View source
# classicBrushDistanceSquared
inline function classicBrushDistanceSquared(submission, viewOrigin)
Return the classic brush distance squared value.
| Parameter | Type | Default | Description |
|---|
submission | dynamic | — | submission value consumed by this operation. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# classicBrushDynamicLightmaps
function classicBrushDynamicLightmaps(world, entity, plan, frame)
Return the classic brush dynamic lightmaps value.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
plan | dynamic | — | plan value consumed by this operation. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
brushModel | dynamic | — | brushModel value consumed by this operation. |
plan | dynamic | — | plan value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# classicBrushFrameSignature
function classicBrushFrameSignature(brushFrame)
Return the classic brush frame signature value.
| Parameter | Type | Default | Description |
|---|
brushFrame | dynamic | — | brushFrame value consumed by this operation. |
View source
# classicBrushLocalLights
function classicBrushLocalLights(entity, frame)
Return the classic brush local lights value.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
brushModel | dynamic | — | brushModel value consumed by this operation. |
View source
# classicDrawCanCache
inline function classicDrawCanCache(draw)
Report whether classic draw can cache.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
draw | dynamic | — | draw value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
dLights | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
draw | dynamic | — | draw value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
dLightCount | dynamic | — | Number of d light to process. |
retained | dynamic | — | retained value consumed by this operation. |
View source
# classicInlineModelIndex
function classicInlineModelIndex(modelAsset)
Return the classic inline model index.
| Parameter | Type | Default | Description |
|---|
modelAsset | dynamic | — | modelAsset value consumed by this operation. |
View source
# classicRegistrationAssets
function classicRegistrationAssets(binding)
Return the CPU-side registration graph retained across a video mode change.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
View source
# classicTransparentDistance
inline function classicTransparentDistance(draw, entity, viewOrigin)
Return the classic transparent distance value.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# classicTransparentFrameSignature
function classicTransparentFrameSignature(draws)
Return the classic transparent frame signature value.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
View source
# clipOpenGlSkyPolygon
function clipOpenGlSkyPolygon(bounds, vertices, count, stage)
Compatibility wrapper used by focused geometry tests.
| Parameter | Type | Default | Description |
|---|
bounds | dynamic | — | bounds value consumed by this operation. |
vertices | dynamic | — | vertices value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
stage | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
bounds | dynamic | — | bounds value consumed by this operation. |
vertices | dynamic | — | vertices value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
stage | dynamic | — | stage value consumed by this operation. |
scratch | dynamic | — | scratch value consumed by this operation. |
View source
# colorByte
inline function colorByte(value, shift)
Return the color byte value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
shift | dynamic | — | shift value consumed by this operation. |
View source
# createOpenGlRenderer
function createOpenGlRenderer(contextActive)
Create open gl renderer.
| Parameter | Type | Default | Description |
|---|
contextActive | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
View source
# drawOpenGlClassicBrushLightmaps
function drawOpenGlClassicBrushLightmaps(binding, submission, time)
Draw open gl classic brush lightmaps.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
submission | dynamic | — | submission value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# drawOpenGlClassicBrushOpaque
function drawOpenGlClassicBrushOpaque(binding, submission, frame)
Draw open gl classic brush opaque.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
submission | dynamic | — | submission value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# drawOpenGlClassicDraws
function drawOpenGlClassicDraws(binding, draws, drawCount, time, lightmap, entityFrame)
Draw open gl classic draws.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
time | dynamic | — | time value consumed by this operation. |
lightmap | dynamic | — | lightmap value consumed by this operation. |
entityFrame | dynamic | — | entityFrame value consumed by this operation. |
View source
# drawOpenGlClassicTransparentFrame
function drawOpenGlClassicTransparentFrame(binding, draws, drawCount, frame)
Draw open gl classic transparent frame.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# drawOpenGlEntityPass
function drawOpenGlEntityPass(backend, frame, axes, translucentPass)
Draw open gl entity pass.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
axes | dynamic | — | axes value consumed by this operation. |
translucentPass | dynamic | — | translucentPass value consumed by this operation. |
View source
# drawOpenGlMd2EntityFast
function drawOpenGlMd2EntityFast(backend, modelAsset, entity, frame, entityIndex)
Draw open gl md 2 entity fast.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
modelAsset | dynamic | — | modelAsset value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entityIndex | dynamic | — | Zero-based index of entity. |
View source
# drawOpenGlMd2Plan
function drawOpenGlMd2Plan(backend, plan, entity)
Draw open gl md 2 plan.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
plan | dynamic | — | plan value consumed by this operation. |
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
skinAsset | dynamic | — | skinAsset value consumed by this operation. |
glVertices | dynamic | — | glVertices value consumed by this operation. |
triangleCount | dynamic | — | Number of triangle to process. |
vertexCount | dynamic | — | Number of vertex to process. |
resultBounds | dynamic | — | resultBounds value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# drawOpenGlNullEntity
function drawOpenGlNullEntity(entity)
Draw open gl null entity.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
View source
# drawOpenGlPolyBlend
function drawOpenGlPolyBlend(frame)
Draw open gl poly blend.
| Parameter | Type | Default | Description |
|---|
frame | dynamic | — | frame value consumed by this operation. |
View source
# drawOpenGlSkyBox
function drawOpenGlSkyBox(binding, world, frame, draws, drawCount)
Draw open gl sky box.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
View source
# drawOpenGlSpriteEntity
function drawOpenGlSpriteEntity(backend, modelAsset, entity, axes)
Draw open gl sprite entity.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
modelAsset | dynamic | — | modelAsset value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
axes | dynamic | — | axes value consumed by this operation. |
View source
# drawParticles
function drawParticles(backend, frame, axes)
Draw particles.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
axes | dynamic | — | axes value consumed by this operation. |
View source
# drawSolidRect
function drawSolidRect(backend, x, y, width, height, color)
Draw solid rect.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
color | dynamic | — | color value consumed by this operation. |
View source
# drawTexturedRect
function drawTexturedRect(backend, asset, x, y, width, height)
Draw textured rect.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
asset | dynamic | — | asset value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
asset | dynamic | — | asset value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
left | dynamic | — | left value consumed by this operation. |
top | dynamic | — | top value consumed by this operation. |
right | dynamic | — | right value consumed by this operation. |
bottom | dynamic | — | bottom value consumed by this operation. |
View source
# drawTiledRect
function drawTiledRect(backend, asset, x, y, width, height)
Draw tiled rect.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
asset | dynamic | — | asset value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
View source
# emitClassicDraw
function emitClassicDraw(draw, lightmap, time)
Emit classic draw.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
lightmap | dynamic | — | lightmap value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# emitClassicVertex
function emitClassicVertex(draw, vertex, lightmap, time)
Emit classic vertex.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
vertex | dynamic | — | vertex value consumed by this operation. |
lightmap | dynamic | — | lightmap value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# emitOpenGlMd2Scalars
function emitOpenGlMd2Scalars(glVertices)
Emit open gl md 2 scalars.
| Parameter | Type | Default | Description |
|---|
glVertices | dynamic | — | glVertices value consumed by this operation. |
View source
# emitOpenGlSkyVertex
function emitOpenGlSkyVertex(s, t, axis, texture)
Emit open gl sky vertex.
| Parameter | Type | Default | Description |
|---|
s | dynamic | — | s value consumed by this operation. |
t | dynamic | — | t value consumed by this operation. |
axis | dynamic | — | axis value consumed by this operation. |
texture | dynamic | — | texture value consumed by this operation. |
View source
# endOpenGlMd2Draw
function endOpenGlMd2Draw(drawState)
End open gl md 2 draw.
| Parameter | Type | Default | Description |
|---|
drawState | dynamic | — | drawState value consumed by this operation. |
View source
# ensureOpenGlParticleTexture
function ensureOpenGlParticleTexture(backend)
Ensure open gl particle texture.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
View source
# ensureOpenGlPictureTexture
function ensureOpenGlPictureTexture(backend, asset)
Ensure open gl picture texture.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
asset | dynamic | — | asset value consumed by this operation. |
View source
# ensureOpenGlRawTexture
function ensureOpenGlRawTexture(backend)
Ensure open gl raw texture.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
id | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
imports | dynamic | — | imports value consumed by this operation. |
contextActive | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
View source
# lastShadowEntities
function lastShadowEntities(binding)
Return the last shadow entities value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
View source
# lightLevel
function lightLevel(binding)
Return the light level value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# md2EntityVisible
function md2EntityVisible(binding, entity)
Report whether md 2 entity visible.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
modelHandle | dynamic | — | modelHandle value consumed by this operation. |
frameIndex | dynamic | — | Zero-based index of frame. |
View source
# md2ModelPitch
function md2ModelPitch(angle)
Return the md 2 model pitch value.
| Parameter | Type | Default | Description |
|---|
angle | dynamic | — | angle value consumed by this operation. |
View source
# md2ShadeRow
function md2ShadeRow(binding, yaw)
Return the md 2 shade row value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
yaw | dynamic | — | yaw value consumed by this operation. |
View source
# md2ShadowEligible
function md2ShadowEligible(binding, entity)
Return the md 2 shadow eligible value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# md2ShadowLightHeight
function md2ShadowLightHeight(entity, spotZ)
Return the md 2 shadow light height value.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
spotZ | dynamic | — | spotZ value consumed by this operation. |
View source
# md2ShadowVectorX
function md2ShadowVectorX(yaw)
Return the md 2 shadow vector x value.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | yaw value consumed by this operation. |
View source
# md2ShadowVectorY
function md2ShadowVectorY(yaw)
Return the md 2 shadow vector y value.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
activate | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
first | dynamic | — | first value consumed by this operation. |
second | dynamic | — | second value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# openGlBeamScalars
function openGlBeamScalars(entity)
Open gl beam scalars.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
View source
# openGlBeginFrame
function openGlBeginFrame(cameraSeparation)
Open gl begin frame.
| Parameter | Type | Default | Description |
|---|
cameraSeparation | dynamic | — | cameraSeparation value consumed by this operation. |
View source
# openGlBeginRegistration
function openGlBeginRegistration(mapName)
Open gl begin registration.
| Parameter | Type | Default | Description |
|---|
mapName | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
palette | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
character | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
color | dynamic | — | color value consumed by this operation. |
View source
# openGlDrawGetPicSize
function openGlDrawGetPicSize(name)
Open gl draw get pic size.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# openGlDrawPic
function openGlDrawPic(x, y, name)
Open gl draw pic.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# openGlDrawStretchPic
function openGlDrawStretchPic(x, y, width, height, name)
Open gl draw stretch pic.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
name | dynamic | — | Name of the affected item. |
View source
# openGlDrawStretchRaw
function openGlDrawStretchRaw(x, y, width, height, columns, rows, data)
Open gl draw stretch raw.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
columns | dynamic | — | columns value consumed by this operation. |
rows | dynamic | — | rows value consumed by this operation. |
data | dynamic | — | Input data consumed by the operation. |
View source
# openGlDrawTileClear
function openGlDrawTileClear(x, y, width, height, name)
Open gl draw tile clear.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
modelAsset | dynamic | — | modelAsset value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# openGlMd2EntityVisible
inline function openGlMd2EntityVisible(backend, entity)
Report whether open gl md 2 entity visible.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# openGlMd2FrameShade
function openGlMd2FrameShade(backend, frame, entity)
Open gl md 2 frame shade.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# openGlMd2FrameShadeComponentsAt
function openGlMd2FrameShadeComponentsAt(backend, frame, entity, entityIndex)
Open gl md 2 frame shade components.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
entityIndex | dynamic | — | Zero-based index of entity. |
View source
# openGlMd2GeometryState
inline function openGlMd2GeometryState(frameIndex, oldFrameIndex)
Return the immutable GPU cache state for one MD2 frame pair.
| Parameter | Type | Default | Description |
|---|
frameIndex | dynamic | — | Zero-based index of frame. |
oldFrameIndex | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
angle | dynamic | — | angle value consumed by this operation. |
View source
# openGlMd2NormalVectors
function openGlMd2NormalVectors(backend)
Open gl md 2 normal vectors.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
View source
# openGlMd2Shade
function openGlMd2Shade(entity, time)
Open gl md 2 shade.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# openGlMd2ShadeColor
function openGlMd2ShadeColor(entity, time, rdFlags, baseColor)
Open gl md 2 shade color.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
rdFlags | dynamic | — | rdFlags value consumed by this operation. |
baseColor | dynamic | — | baseColor value consumed by this operation. |
View source
# openGlMd2ShadeComponents
function openGlMd2ShadeComponents(entity, time, rdFlags, baseColor)
Open gl md 2 shade components.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
rdFlags | dynamic | — | rdFlags value consumed by this operation. |
baseColor | dynamic | — | baseColor value consumed by this operation. |
View source
# openGlMd2ShadeRow
function openGlMd2ShadeRow(backend, yaw)
Open gl md 2 shade row.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
yaw | dynamic | — | yaw value consumed by this operation. |
View source
# openGlMd2ShadeRowIndex
inline function openGlMd2ShadeRowIndex(yaw)
Open gl md 2 shade row index.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | yaw value consumed by this operation. |
View source
# openGlMd2ShadowEligible
inline function openGlMd2ShadowEligible(backend, entity)
Open gl md 2 shadow eligible.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# openGlMd2ShadowLightHeight
inline function openGlMd2ShadowLightHeight(entity, spotZ)
Open gl md 2 shadow light height.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | entity value consumed by this operation. |
spotZ | dynamic | — | spotZ value consumed by this operation. |
View source
# openGlMd2ShadowVectorX
inline function openGlMd2ShadowVectorX(yaw)
Open gl md 2 shadow vector x.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | yaw value consumed by this operation. |
View source
# openGlMd2ShadowVectorY
inline function openGlMd2ShadowVectorY(yaw)
Open gl md 2 shadow vector y.
| Parameter | Type | Default | Description |
|---|
yaw | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
frameIndex | dynamic | — | Zero-based index of frame. |
oldFrameIndex | dynamic | — | Zero-based index of old frame. |
shell | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
entityIndex | dynamic | — | Zero-based index of entity. |
View source
# openGlPackMd2Shade
inline function openGlPackMd2Shade(color)
Open gl pack md 2 shade.
| Parameter | Type | Default | Description |
|---|
color | dynamic | — | color value consumed by this operation. |
View source
# openGlPaletteColor
inline function openGlPaletteColor(palette, index)
Open gl palette color.
| Parameter | Type | Default | Description |
|---|
palette | dynamic | — | palette value consumed by this operation. |
index | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
blend | dynamic | — | blend value consumed by this operation. |
View source
miniquake2.renderer.opengl.OpenGlRawFrame struct
# openGlRegisterModel
function openGlRegisterModel(name)
Open gl register model.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# openGlRegisterPic
function openGlRegisterPic(name)
Open gl register pic.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# openGlRegisterSkin
function openGlRegisterSkin(name)
Open gl register skin.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# openGlRendererInit
function openGlRendererInit(hinstance, wndproc)
Open gl renderer init.
| Parameter | Type | Default | Description |
|---|
hinstance | dynamic | — | hinstance value consumed by this operation. |
wndproc | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
operation | dynamic | — | operation value consumed by this operation. |
View source
# openGlSetSky
function openGlSetSky(name, rotate, axis)
Open gl set sky.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
rotate | dynamic | — | rotate value consumed by this operation. |
axis | dynamic | — | axis value consumed by this operation. |
View source
# openGlShadeByte
inline function openGlShadeByte(component)
Open gl shade byte.
| Parameter | Type | Default | Description |
|---|
component | dynamic | — | component value consumed by this operation. |
View source
# openGlSkyBounds
function openGlSkyBounds(draws, viewOrigin)
Compatibility wrapper for exact diagnostic arrays.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# openGlSkyBoundsPrefix
function openGlSkyBoundsPrefix(draws, drawCount, viewOrigin)
Open gl sky bounds.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# openGlSkyClipDistance
function openGlSkyClipDistance(value, stage)
Open gl sky clip distance.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
stage | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
viewAngles | dynamic | — | viewAngles value consumed by this operation. |
View source
miniquake2.renderer.opengl.OpenGlViewAxes struct
# picturePixels
function picturePixels(asset)
Return the picture pixels value.
| Parameter | Type | Default | Description |
|---|
asset | dynamic | — | asset value consumed by this operation. |
View source
# pictureUploadPixels
function pictureUploadPixels(asset)
Return the picture upload pixels value.
| Parameter | Type | Default | Description |
|---|
asset | dynamic | — | asset value consumed by this operation. |
View source
# precacheOpenGlClassicGeometry
function precacheOpenGlClassicGeometry(world)
Open precache gl classic geometry.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# prepareClassicTransparentFrame
function prepareClassicTransparentFrame(worldPlan, brushFrame, frame)
Compatibility wrapper returning an exact diagnostic array.
| Parameter | Type | Default | Description |
|---|
worldPlan | dynamic | — | worldPlan value consumed by this operation. |
brushFrame | dynamic | — | brushFrame value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# prepareClassicTransparentFramePrefix
function prepareClassicTransparentFramePrefix(worldPlan, brushFrame, frame)
Prepare classic transparent frame.
| Parameter | Type | Default | Description |
|---|
worldPlan | dynamic | — | worldPlan value consumed by this operation. |
brushFrame | dynamic | — | brushFrame value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
View source
# prepareClassicWorld
function prepareClassicWorld(binding, map, loadFile, lightStyles, entityFrame, modulate)
Prepare classic world.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
map | dynamic | — | map value consumed by this operation. |
loadFile | dynamic | — | loadFile value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
entityFrame | dynamic | — | entityFrame value consumed by this operation. |
modulate | dynamic | — | modulate value consumed by this operation. |
View source
# prepareMd2Entity
function prepareMd2Entity(binding, entity)
Prepare md 2 entity.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# prepareOpenGlClassicDraw
function prepareOpenGlClassicDraw(draw, pass, lightmap)
Prepare open gl classic draw.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
pass | dynamic | — | pass value consumed by this operation. |
lightmap | dynamic | — | lightmap value consumed by this operation. |
View source
# prepareOpenGlClassicMultitextureDraw
function prepareOpenGlClassicMultitextureDraw(draw)
Prepare open gl classic multitexture draw.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
View source
# prepareOpenGlMd2Entity
function prepareOpenGlMd2Entity(backend, entity)
Prepare open gl md 2 entity.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# prepareOpenGlRawFrame
function prepareOpenGlRawFrame(columns, rows, data, palette, reusable)
Prepare open gl raw frame.
| Parameter | Type | Default | Description |
|---|
columns | dynamic | — | columns value consumed by this operation. |
rows | dynamic | — | rows value consumed by this operation. |
data | dynamic | — | Input data consumed by the operation. |
palette | dynamic | — | palette value consumed by this operation. |
reusable | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
frame | dynamic | — | frame value consumed by this operation. |
View source
# projectOpenGlSkyPolygon
function projectOpenGlSkyPolygon(bounds, vertices, count)
Project open gl sky polygon.
| Parameter | Type | Default | Description |
|---|
bounds | dynamic | — | bounds value consumed by this operation. |
vertices | dynamic | — | vertices value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# pushOpenGlClassicBrush
function pushOpenGlClassicBrush(entity)
Open push gl classic brush.
| Parameter | Type | Default | Description |
|---|
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
stats | dynamic | — | stats value consumed by this operation. |
uploaded | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
loadFile | dynamic | — | loadFile value consumed by this operation. |
View source
# releaseClassicWorld
function releaseClassicWorld(binding, world)
Release classic world.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
View source
# releaseOpenGlTextureRecord
function releaseOpenGlTextureRecord(backend, record)
Release open gl texture record.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
record | dynamic | — | record value consumed by this operation. |
View source
# releaseOpenGlTextureRecords
function releaseOpenGlTextureRecords(backend)
Release open gl texture records.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
View source
# resetOpenGlSkyBounds
function resetOpenGlSkyBounds(bounds)
Reset the persistent sky bounds for a new view.
| Parameter | Type | Default | Description |
|---|
bounds | dynamic | — | bounds value consumed by this operation. |
View source
# resolveOpenGlMd2Skin
function resolveOpenGlMd2Skin(backend, modelAsset, entity)
Resolve open gl md 2 skin.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
modelAsset | dynamic | — | modelAsset value consumed by this operation. |
entity | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
registrationAssets | dynamic | — | registrationAssets value consumed by this operation. |
View source
# setBrightness
function setBrightness(binding, brightness)
Set the post-composition brightness/gamma value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
brightness | dynamic | — | brightness value consumed by this operation. |
View source
# setContextActive
function setContextActive(binding, active)
Report whether set context active.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
active | dynamic | — | active value consumed by this operation. |
View source
# setHandedness
function setHandedness(binding, hand)
Set handedness.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
hand | dynamic | — | hand value consumed by this operation. |
View source
# setOpenGlSkyScratchVertex
inline function setOpenGlSkyScratchVertex(buffer, index, x, y, z)
Copy coordinates into one retained vertex object.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
index | dynamic | — | Zero-based index of the affected item. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
z | dynamic | — | z value consumed by this operation. |
View source
# setShadows
function setShadows(binding, enabled)
Set shadows.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
enabled | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
frame | dynamic | — | frame value consumed by this operation. |
View source
# shadows
function shadows(binding)
Return the shadows value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
View source
# sortClassicBrushSubmissionPrefix
function sortClassicBrushSubmissionPrefix(submissions, count, viewOrigin)
Sort classic brush submission prefix.
| Parameter | Type | Default | Description |
|---|
submissions | dynamic | — | submissions value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# sortClassicBrushSubmissions
function sortClassicBrushSubmissions(submissions, viewOrigin)
Sort classic brush submissions.
| Parameter | Type | Default | Description |
|---|
submissions | dynamic | — | submissions value consumed by this operation. |
viewOrigin | dynamic | — | viewOrigin value consumed by this operation. |
View source
# sortClassicTransparentDraws
function sortClassicTransparentDraws(draws)
Sort classic transparent draws.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
View source
# sortClassicTransparentDrawsInPlace
function sortClassicTransparentDrawsInPlace(draws, count)
Sort classic transparent draws in place.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
count | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
entity | dynamic | — | entity value consumed by this operation. |
View source
# submitOpenGlClassicDraw
function submitOpenGlClassicDraw(draw, lightmap, time)
Submit open gl classic draw.
| Parameter | Type | Default | Description |
|---|
draw | dynamic | — | draw value consumed by this operation. |
lightmap | dynamic | — | lightmap value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# submitOpenGlClassicMultitexture
function submitOpenGlClassicMultitexture(binding, draws, drawCount, time)
Submit open gl classic multitexture.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
time | dynamic | — | time value consumed by this operation. |
View source
# submitOpenGlRefDefMd2Entities
function submitOpenGlRefDefMd2Entities(backend, frame)
Submit open gl ref def md 2 entities.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
mesh | dynamic | — | mesh value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
angles | dynamic | — | angles value consumed by this operation. |
red | dynamic | — | red value consumed by this operation. |
green | dynamic | — | green value consumed by this operation. |
blue | dynamic | — | blue value consumed by this operation. |
alpha | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
world | dynamic | — | world value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
drawCount | dynamic | — | Number of draw to process. |
frame | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
View source
# uploadClassicBrushLightmap
function uploadClassicBrushLightmap(binding, brushLightmap)
Return the upload classic brush lightmap value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
brushLightmap | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
draw | dynamic | — | draw value consumed by this operation. |
rgbaPixels | dynamic | — | rgbaPixels value consumed by this operation. |
View source
# uploadClassicTexture
function uploadClassicTexture(binding, texture)
Return the upload classic texture value.
| Parameter | Type | Default | Description |
|---|
binding | dynamic | — | binding value consumed by this operation. |
texture | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
rgba | dynamic | — | rgba value consumed by this operation. |
View source
# uploadPicture
function uploadPicture(backend, asset)
Return the upload picture value.
| Parameter | Type | Default | Description |
|---|
backend | dynamic | — | backend value consumed by this operation. |
asset | dynamic | — | asset value consumed by this operation. |
View source
# writeOpenGlBatchU32
inline function writeOpenGlBatchU32(buffer, offset, value)
Write open gl batch u 32.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
offset | dynamic | — | Zero-based offset at which processing starts. |
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# writeOpenGlMultitextureRecord
inline function writeOpenGlMultitextureRecord(buffer, index, draw, baseTextureId, lightmapTextureId)
Write open gl multitexture record.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
index | dynamic | — | Zero-based index of the affected item. |
draw | dynamic | — | draw value consumed by this operation. |
baseTextureId | dynamic | — | Identifier of base texture. |
lightmapTextureId | dynamic | — | Identifier of lightmap texture. |
View source
# writeOpenGlParticleRecord
function writeOpenGlParticleRecord(buffer, index, packed, alpha, origin)
Write open gl particle record.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
index | dynamic | — | Zero-based index of the affected item. |
packed | dynamic | — | packed value consumed by this operation. |
alpha | dynamic | — | alpha value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source