# BoundPoly
function BoundPoly(vertices)Implements the `BoundPoly` operation for `miniquake.render.gl_warp` (bound poly).
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `BoundPoly`. |
src/miniquake/render/gl_warp.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/types.ml as t → src/miniquake/types.mlfunction BoundPoly(vertices)Implements the `BoundPoly` operation for `miniquake.render.gl_warp` (bound poly).
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `BoundPoly`. |
function CurrentSubdivideSize()Return subdivide size.
const DEFAULT_SUBDIVIDE_SIZE = 128.Defines the default subdivide size value used by `miniquake.render.gl_warp`.
function EmitBothSkyLayers(polygons, viewOrigin, realtime)Add both sky layers to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
polygons | dynamic | — | The polygons input consumed by `EmitBothSkyLayers`. |
viewOrigin | dynamic | — | The view origin input consumed by `EmitBothSkyLayers`. |
realtime | dynamic | — | Time value used by the operation. |
function EmitSkyPolys(polygons, viewOrigin, currentSpeedScale)Add sky polys to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
polygons | dynamic | — | The polygons input consumed by `EmitSkyPolys`. |
viewOrigin | dynamic | — | The view origin input consumed by `EmitSkyPolys`. |
currentSpeedScale | dynamic | — | The current speed scale input consumed by `EmitSkyPolys`. |
function EmitWaterPolys(polygons, realtime)Add water polys to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
polygons | dynamic | — | The polygons input consumed by `EmitWaterPolys`. |
realtime | dynamic | — | Time value used by the operation. |
function floorValue(value)Implements the `floorValue` operation for `miniquake.render.gl_warp` (floor value).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `floorValue`. |
gl_subdivide_sizegl_model.c owns this archived cvar in MiniQuake. Keep its current numeric value at the warp boundary so every subdivision path observes changes made through the console instead of baking the default into generated polygons.
function GL_SubdivideSurface(vertices, sVector, tVector, subdivideSize)Mirror Quake's GL_SubdivideSurface routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `GL_SubdivideSurface`. |
sVector | dynamic | — | The s vector input consumed by `GL_SubdivideSurface`. |
tVector | dynamic | — | The t vector input consumed by `GL_SubdivideSurface`. |
subdivideSize | dynamic | — | Size of the requested data or resource. |
function InterpolatedTurb(indexValue)Interpolate adjacent entries in GLQuake's canonical turbulence table. This preserves the original wave shape while removing visible 256-step texture coordinate jumps in the optional Enhanced presentation.
| Parameter | Type | Default | Description |
|---|---|---|---|
indexValue | dynamic | — | The index value input consumed by `InterpolatedTurb`. |
function interpolateVertex(first, second, fraction)Implements the `interpolateVertex` operation for `miniquake.render.gl_warp` (interpolate vertex).
| Parameter | Type | Default | Description |
|---|---|---|---|
first | dynamic | — | The first input consumed by `interpolateVertex`. |
second | dynamic | — | The second input consumed by `interpolateVertex`. |
fraction | dynamic | — | The fraction input consumed by `interpolateVertex`. |
function R_DrawSkyChain(surfacePolygons, viewOrigin, realtime)Apply the Quake-compatible r draw sky chain behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
surfacePolygons | dynamic | — | The surface polygons input consumed by `R_DrawSkyChain`. |
viewOrigin | dynamic | — | The view origin input consumed by `R_DrawSkyChain`. |
realtime | dynamic | — | Time value used by the operation. |
function R_InitSky(texture, palette)Apply the Quake-compatible r init sky behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
palette | dynamic | — | The palette input consumed by `R_InitSky`. |
function R_InitSkyPixels(texture, palette)Apply the Quake-compatible r init sky pixels behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
palette | dynamic | — | The palette input consumed by `R_InitSkyPixels`. |
function SetSubdivideSize(value)Update module state for subdivide size.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `SetSubdivideSize`. |
function SkyTexCoords(position, viewOrigin, currentSpeedScale)Implements the `SkyTexCoords` operation for `miniquake.render.gl_warp` (sky tex coords).
| Parameter | Type | Default | Description |
|---|---|---|---|
position | dynamic | — | Position used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `SkyTexCoords`. |
currentSpeedScale | dynamic | — | The current speed scale input consumed by `SkyTexCoords`. |
function SmoothWaterTexCoords(originalS, originalT, realtime)Return smoothly interpolated water coordinates for the Enhanced profile.
| Parameter | Type | Default | Description |
|---|---|---|---|
originalS | dynamic | — | The original s input consumed by `SmoothWaterTexCoords`. |
originalT | dynamic | — | The original t input consumed by `SmoothWaterTexCoords`. |
realtime | dynamic | — | Time value used by the operation. |
function SubdividePolygon(vertices, subdivideSize)Implements the `SubdividePolygon` operation for `miniquake.render.gl_warp` (subdivide polygon).
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `SubdividePolygon`. |
subdivideSize | dynamic | — | Size of the requested data or resource. |
function subdivideRecursive(vertices, output, subdivideSize)Implements the `subdivideRecursive` operation for `miniquake.render.gl_warp` (subdivide recursive).
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `subdivideRecursive`. |
output | dynamic | — | Destination collection that receives subdivided polygons. |
subdivideSize | dynamic | — | Size of the requested data or resource. |
function SurfaceWarpVertices(vertices, sVector, tVector)Implements the `SurfaceWarpVertices` operation for `miniquake.render.gl_warp` (surface warp vertices).
| Parameter | Type | Default | Description |
|---|---|---|---|
vertices | dynamic | — | The vertices input consumed by `SurfaceWarpVertices`. |
sVector | dynamic | — | The s vector input consumed by `SurfaceWarpVertices`. |
tVector | dynamic | — | The t vector input consumed by `SurfaceWarpVertices`. |
const TURBSCALE = 40.7436654315252Defines the turbscale value used by `miniquake.render.gl_warp`.
turbsinExact table from gl_warp_sin.h. Looking up this table, rather than calling sin at render time, is observable in texture-coordinate command traces.
function warpFloat(value)gl_warp.c stores all polygon, direction, and texture-coordinate values in float fields. Explicitly cross the IEEE-754 binary32 boundary at the same assignments so the MiniLang backend cannot retain additional precision.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `warpFloat`. |
function WaterTexCoords(originalS, originalT, realtime)Implements the `WaterTexCoords` operation for `miniquake.render.gl_warp` (water tex coords).
| Parameter | Type | Default | Description |
|---|---|---|---|
originalS | dynamic | — | The original s input consumed by `WaterTexCoords`. |
originalT | dynamic | — | The original t input consumed by `WaterTexCoords`. |
realtime | dynamic | — | Time value used by the operation. |
function WrappedSpeedScale(realtime, speed)Implements the `WrappedSpeedScale` operation for `miniquake.render.gl_warp` (wrapped speed scale).
| Parameter | Type | Default | Description |
|---|---|---|---|
realtime | dynamic | — | Time value used by the operation. |
speed | dynamic | — | The speed input consumed by `WrappedSpeedScale`. |