# activeLightCount
activeLightCountTracks the module-level active light count state owned by `miniquake.render.enhanced`.
src/miniquake/render/enhanced.mlminiquake/byteio.ml as byteio → src/miniquake/byteio.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlactiveLightCountTracks the module-level active light count state owned by `miniquake.render.enhanced`.
function beginFrame(dynamicLights, currentTime, viewOrigin)Select the strongest active lights, pack them into the reusable bridge buffer, and capture the current view matrix in the native backend.
| Parameter | Type | Default | Description |
|---|---|---|---|
dynamicLights | dynamic | — | The dynamic lights input consumed by `beginFrame`. |
currentTime | dynamic | — | Time value used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `beginFrame`. |
function beginOverlay()Select the additive per-pixel draw program for following 3-D geometry.
function clampShadowQuality(value)Clamp a requested shadow quality to the stable menu/config range.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `clampShadowQuality`. |
function configure(requestedEnabled, requestedShadows, requestedShadowQuality)Configure the shared native enhanced renderer while preserving Classic as the safe fallback if the active backend cannot create its GPU program.
| Parameter | Type | Default | Description |
|---|---|---|---|
requestedEnabled | dynamic | — | The requested enabled input consumed by `configure`. |
requestedShadows | dynamic | — | The requested shadows input consumed by `configure`. |
requestedShadowQuality | dynamic | — | The requested shadow quality input consumed by `configure`. |
enabledTracks the module-level enabled state owned by `miniquake.render.enhanced`.
function endFrame()Finalize the enhanced portion of the frame before 2-D rendering begins.
function endOverlay()Restore compatibility drawing after an enhanced geometry batch.
function hasActiveLights()Report whether this frame contains at least one live dynamic light. The world/entity renderers use this to avoid a black additive replay.
function isEnabled()Report whether the enhanced path is active for the current frame.
const LIGHT_BYTES = LIGHT_FLOATS * 4Defines the light bytes value used by `miniquake.render.enhanced`.
const LIGHT_FLOATS = 4Defines the light floats value used by `miniquake.render.enhanced`.
lightPacketTracks the module-level light packet state owned by `miniquake.render.enhanced`.
const MAX_ENHANCED_LIGHTS = 16Keep a bounded dynamic-light packet for the native raster backends without changing Quake's authoritative game state.
function putLightFloat(offset, value)Write one IEEE-754 light component without allocating a temporary byte array. Native receives {world x,y,z,radius} records.
| Parameter | Type | Default | Description |
|---|---|---|---|
offset | dynamic | — | Zero-based offset of the requested data. |
value | dynamic | — | Value consumed by `putLightFloat`. |
selectedLightIndexesTracks the module-level selected light indexes state owned by `miniquake.render.enhanced`.
selectedLightScoresTracks the module-level selected light scores state owned by `miniquake.render.enhanced`.
function shadowQuality()Return the clamped enhanced shadow-quality level.
shadowQualityValueTracks the module-level shadow quality value state owned by `miniquake.render.enhanced`.
function shadowsActive()Report whether enhanced entity/world shadows were requested.
shadowsEnabledTracks the module-level shadows enabled state owned by `miniquake.render.enhanced`.
function worldLightEligible(light, currentTime, viewOrigin)Decide whether a dynamic light belongs in the per-pixel world pass. GLQuake treats a camera contained by the inner 35 percent of a flashblend light as a screen tint rather than world geometry. Feeding that same light to the enhanced shader made the local player's randomly sized Quad/EF_DIMLIGHT alternate between an orange world light and the blue powerup cshift.
| Parameter | Type | Default | Description |
|---|---|---|---|
light | dynamic | — | The light input consumed by `worldLightEligible`. |
currentTime | dynamic | — | Time value used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `worldLightEligible`. |