# Add
function Add(left, right)Add state for add.
| Parameter | Type | Default | Description |
|---|---|---|---|
left | dynamic | — | The left input consumed by `Add`. |
right | dynamic | — | The right input consumed by `Add`. |
src/miniquake/render/gl_rmain.mlminiquake/native.ml as native → src/miniquake/native.mlfunction Add(left, right)Add state for add.
| Parameter | Type | Default | Description |
|---|---|---|---|
left | dynamic | — | The left input consumed by `Add`. |
right | dynamic | — | The right input consumed by `Add`. |
function Bind(texture)Implements the `Bind` operation for `miniquake.render.gl_rmain` (bind).
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
blendColorTracks the module-level blend color state owned by `miniquake.render.gl_rmain`.
function BoxOnPlaneSide(mins, maxs, plane)Implements the `BoxOnPlaneSide` operation for `miniquake.render.gl_rmain` (box on plane side).
| Parameter | Type | Default | Description |
|---|---|---|---|
mins | dynamic | — | The mins input consumed by `BoxOnPlaneSide`. |
maxs | dynamic | — | The maxs input consumed by `BoxOnPlaneSide`. |
plane | dynamic | — | The plane input consumed by `BoxOnPlaneSide`. |
c_alias_polysTracks the module-level c alias polys state owned by `miniquake.render.gl_rmain`.
c_brush_polysTracks the module-level c brush polys state owned by `miniquake.render.gl_rmain`.
function Clear(mask)Implements the `Clear` operation for `miniquake.render.gl_rmain` (clear).
| Parameter | Type | Default | Description |
|---|---|---|---|
mask | dynamic | — | The mask input consumed by `Clear`. |
clearColorTracks the module-level clear color state owned by `miniquake.render.gl_rmain`.
function DepthFunc(value)Implements the `DepthFunc` operation for `miniquake.render.gl_rmain` (depth func).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `DepthFunc`. |
function DepthRange(minimum, maximum)Implements the `DepthRange` operation for `miniquake.render.gl_rmain` (depth range).
| Parameter | Type | Default | Description |
|---|---|---|---|
minimum | dynamic | — | Smallest accepted value. |
maximum | dynamic | — | Largest accepted value. |
inline function Dot(left, right)Implements the `Dot` operation for `miniquake.render.gl_rmain` (dot).
| Parameter | Type | Default | Description |
|---|---|---|---|
left | dynamic | — | The left input consumed by `Dot`. |
right | dynamic | — | The right input consumed by `Dot`. |
function F32(value)Implements the `F32` operation for `miniquake.render.gl_rmain` (f32).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `F32`. |
frustumTracks the module-level frustum state owned by `miniquake.render.gl_rmain`.
function GetFrameState()Return frame state.
function GetSinkState()Return sink state.
GL_ALPHA_TESTDirect MiniLang pendant of WinQuake/gl_rmain.c. Renderer-owned objects are represented as compact arrays here so the complete original control flow can be executed headlessly by the differential oracle. The live renderer keeps its richer model/entity objects in render/original.ml and render/entities.ml.
GL_BACKTracks the module-level gl back state owned by `miniquake.render.gl_rmain`.
GL_BLENDTracks the module-level gl blend state owned by `miniquake.render.gl_rmain`.
GL_COLOR_BUFFER_BITTracks the module-level gl color buffer bit state owned by `miniquake.render.gl_rmain`.
GL_CULL_FACETracks the module-level gl cull face state owned by `miniquake.render.gl_rmain`.
GL_DEPTH_BUFFER_BITTracks the module-level gl depth buffer bit state owned by `miniquake.render.gl_rmain`.
GL_DEPTH_TESTTracks the module-level gl depth test state owned by `miniquake.render.gl_rmain`.
function GL_DrawAliasFrame(header, posenum, light)Mirror Quake's GL_DrawAliasFrame routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
header | dynamic | — | The header input consumed by `GL_DrawAliasFrame`. |
posenum | dynamic | — | The posenum input consumed by `GL_DrawAliasFrame`. |
light | dynamic | — | The light input consumed by `GL_DrawAliasFrame`. |
function GL_DrawAliasShadow(header, posenum, entityOrigin, lightSpot, vector)Mirror Quake's GL_DrawAliasShadow routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
header | dynamic | — | The header input consumed by `GL_DrawAliasShadow`. |
posenum | dynamic | — | The posenum input consumed by `GL_DrawAliasShadow`. |
entityOrigin | dynamic | — | The entity origin input consumed by `GL_DrawAliasShadow`. |
lightSpot | dynamic | — | The light spot input consumed by `GL_DrawAliasShadow`. |
vector | dynamic | — | The vector input consumed by `GL_DrawAliasShadow`. |
GL_FASTESTTracks the module-level gl fastest state owned by `miniquake.render.gl_rmain`.
GL_FLATTracks the module-level gl flat state owned by `miniquake.render.gl_rmain`.
GL_FRONTTracks the module-level gl front state owned by `miniquake.render.gl_rmain`.
GL_GEQUALTracks the module-level gl gequal state owned by `miniquake.render.gl_rmain`.
GL_LEQUALTracks the module-level gl lequal state owned by `miniquake.render.gl_rmain`.
GL_MODELVIEWTracks the module-level gl modelview state owned by `miniquake.render.gl_rmain`.
GL_MODELVIEW_MATRIXTracks the module-level gl modelview matrix state owned by `miniquake.render.gl_rmain`.
GL_MODULATETracks the module-level gl modulate state owned by `miniquake.render.gl_rmain`.
GL_NICESTTracks the module-level gl nicest state owned by `miniquake.render.gl_rmain`.
GL_PERSPECTIVE_CORRECTION_HINTTracks the module-level gl perspective correction hint state owned by `miniquake.render.gl_rmain`.
GL_PROJECTIONTracks the module-level gl projection state owned by `miniquake.render.gl_rmain`.
GL_QUADSTracks the module-level gl quads state owned by `miniquake.render.gl_rmain`.
GL_REPLACETracks the module-level gl replace state owned by `miniquake.render.gl_rmain`.
GL_SMOOTHTracks the module-level gl smooth state owned by `miniquake.render.gl_rmain`.
GL_TEXTURE_2DTracks the module-level gl texture 2 d state owned by `miniquake.render.gl_rmain`.
GL_TEXTURE_ENVTracks the module-level gl texture env state owned by `miniquake.render.gl_rmain`.
GL_TEXTURE_ENV_MODETracks the module-level gl texture env mode state owned by `miniquake.render.gl_rmain`.
GL_TRIANGLE_STRIPTracks the module-level gl triangle strip state owned by `miniquake.render.gl_rmain`.
gldepthmaxTracks the module-level gldepthmax state owned by `miniquake.render.gl_rmain`.
gldepthminTracks the module-level gldepthmin state owned by `miniquake.render.gl_rmain`.
lastposenumTracks the module-level lastposenum state owned by `miniquake.render.gl_rmain`.
function MakeAliasHeader()Create and initialize alias header.
mirrorTracks the module-level mirror state owned by `miniquake.render.gl_rmain`.
mirrorAlphaTracks the module-level mirror alpha state owned by `miniquake.render.gl_rmain`.
mirrorPlaneTracks the module-level mirror plane state owned by `miniquake.render.gl_rmain`.
function MultiplyAdd(origin, scale, direction)Implements the `MultiplyAdd` operation for `miniquake.render.gl_rmain` (multiply add).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
scale | dynamic | — | The scale input consumed by `MultiplyAdd`. |
direction | dynamic | — | The direction input consumed by `MultiplyAdd`. |
function MYgluPerspective(fovy, aspect, zNear, zFar)Implements the `MYgluPerspective` operation for `miniquake.render.gl_rmain` (m yglu perspective).
| Parameter | Type | Default | Description |
|---|---|---|---|
fovy | dynamic | — | The fovy input consumed by `MYgluPerspective`. |
aspect | dynamic | — | The aspect input consumed by `MYgluPerspective`. |
zNear | dynamic | — | The z near input consumed by `MYgluPerspective`. |
zFar | dynamic | — | The z far input consumed by `MYgluPerspective`. |
function Note(operation, a, b, c, d)Implements the `Note` operation for `miniquake.render.gl_rmain` (note).
| Parameter | Type | Default | Description |
|---|---|---|---|
operation | dynamic | — | The operation input consumed by `Note`. |
a | dynamic | — | The a input consumed by `Note`. |
b | dynamic | — | The b input consumed by `Note`. |
c | dynamic | — | The c input consumed by `Note`. |
d | dynamic | — | The d input consumed by `Note`. |
function PrepareWorld()Implements the `PrepareWorld` operation for `miniquake.render.gl_rmain` (prepare world).
function R_Clear()Apply the Quake-compatible r clear behavior.
function R_CullBox(mins, maxs)Apply the Quake-compatible r cull box behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
mins | dynamic | — | The mins input consumed by `R_CullBox`. |
maxs | dynamic | — | The maxs input consumed by `R_CullBox`. |
function R_DrawAliasModel(entity, header, time, shadows)Apply the Quake-compatible r draw alias model behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
header | dynamic | — | The header input consumed by `R_DrawAliasModel`. |
time | dynamic | — | Simulation or presentation time for the operation. |
shadows | dynamic | — | The shadows input consumed by `R_DrawAliasModel`. |
r_drawentitiesTracks the module-level r drawentities state owned by `miniquake.render.gl_rmain`.
function R_DrawEntitiesOnList(brushCount, sprites)Apply the Quake-compatible r draw entities on list behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
brushCount | dynamic | — | Number of entries or units to process. |
sprites | dynamic | — | The sprites input consumed by `R_DrawEntitiesOnList`. |
function R_DrawSpriteModel(entity, frame)Apply the Quake-compatible r draw sprite model behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
frame | dynamic | — | The frame input consumed by `R_DrawSpriteModel`. |
function R_DrawViewModel(entity, header, time, shadows)Apply the Quake-compatible r draw view model behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
header | dynamic | — | The header input consumed by `R_DrawViewModel`. |
time | dynamic | — | Simulation or presentation time for the operation. |
shadows | dynamic | — | The shadows input consumed by `R_DrawViewModel`. |
r_drawviewmodelTracks the module-level r drawviewmodel state owned by `miniquake.render.gl_rmain`.
r_fov_xTracks the module-level r fov x state owned by `miniquake.render.gl_rmain`.
r_fov_yTracks the module-level r fov y state owned by `miniquake.render.gl_rmain`.
r_framecountTracks the module-level r framecount state owned by `miniquake.render.gl_rmain`.
function R_GetSpriteFrame(frameType, textures, intervals, time, syncbase)Apply the Quake-compatible r get sprite frame behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
frameType | dynamic | — | The frame type input consumed by `R_GetSpriteFrame`. |
textures | dynamic | — | The textures input consumed by `R_GetSpriteFrame`. |
intervals | dynamic | — | The intervals input consumed by `R_GetSpriteFrame`. |
time | dynamic | — | Simulation or presentation time for the operation. |
syncbase | dynamic | — | The syncbase input consumed by `R_GetSpriteFrame`. |
function R_Mirror()Apply the Quake-compatible r mirror behavior.
r_originTracks the module-level r origin state owned by `miniquake.render.gl_rmain`.
function R_PolyBlend()Apply the Quake-compatible r poly blend behavior.
function R_RenderScene()Apply the Quake-compatible r render scene behavior.
function R_RenderView()Apply the Quake-compatible r render view behavior.
function R_RotateForEntity(entity)Apply the Quake-compatible r rotate for entity behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
function R_SetFrustum()Apply the Quake-compatible r set frustum behavior.
function R_SetupAliasFrame(frame, header, time, light)Apply the Quake-compatible r setup alias frame behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
frame | dynamic | — | The frame input consumed by `R_SetupAliasFrame`. |
header | dynamic | — | The header input consumed by `R_SetupAliasFrame`. |
time | dynamic | — | Simulation or presentation time for the operation. |
light | dynamic | — | The light input consumed by `R_SetupAliasFrame`. |
function R_SetupFrame()Apply the Quake-compatible r setup frame behavior.
function R_SetupGL()Apply the Quake-compatible r setup gl behavior.
r_viewanglesTracks the module-level r viewangles state owned by `miniquake.render.gl_rmain`.
r_vieworgTracks the module-level r vieworg state owned by `miniquake.render.gl_rmain`.
function ResetCompatibility()Update module state for compatibility.
function ResetSink()Update module state for sink.
function SetBlend(value)Update module state for blend.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `SetBlend`. |
function SetClearFlags(alpha, clearValue, zValue)Update module state for clear flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
alpha | dynamic | — | The alpha input consumed by `SetClearFlags`. |
clearValue | dynamic | — | The clear value input consumed by `SetClearFlags`. |
zValue | dynamic | — | The z value input consumed by `SetClearFlags`. |
function SetCullPlanes(planes)Update module state for cull planes.
| Parameter | Type | Default | Description |
|---|---|---|---|
planes | dynamic | — | The planes input consumed by `SetCullPlanes`. |
function SetDepthCompatibility(minimum, maximum)Update module state for depth compatibility.
| Parameter | Type | Default | Description |
|---|---|---|---|
minimum | dynamic | — | Smallest accepted value. |
maximum | dynamic | — | Largest accepted value. |
function SetDrawFlags(entities, viewModel)Update module state for draw flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
entities | dynamic | — | The entities input consumed by `SetDrawFlags`. |
viewModel | dynamic | — | The view model input consumed by `SetDrawFlags`. |
function SetFrameState(frame, brushPolys, aliasPolys)Update module state for frame state.
| Parameter | Type | Default | Description |
|---|---|---|---|
frame | dynamic | — | The frame input consumed by `SetFrameState`. |
brushPolys | dynamic | — | The brush polys input consumed by `SetFrameState`. |
aliasPolys | dynamic | — | The alias polys input consumed by `SetFrameState`. |
function SetMirror(value, plane)Update module state for mirror.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `SetMirror`. |
plane | dynamic | — | The plane input consumed by `SetMirror`. |
function SetViewBasis(origin, forward, right, up)Update module state for view basis.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
forward | dynamic | — | The forward input consumed by `SetViewBasis`. |
right | dynamic | — | The right input consumed by `SetViewBasis`. |
up | dynamic | — | The up input consumed by `SetViewBasis`. |
function SignbitsForPlane(plane)Implements the `SignbitsForPlane` operation for `miniquake.render.gl_rmain` (signbits for plane).
| Parameter | Type | Default | Description |
|---|---|---|---|
plane | dynamic | — | The plane input consumed by `SignbitsForPlane`. |
sinkBindsTracks the module-level sink binds state owned by `miniquake.render.gl_rmain`.
sinkCallsTracks the module-level sink calls state owned by `miniquake.render.gl_rmain`.
sinkClearMaskTracks the module-level sink clear mask state owned by `miniquake.render.gl_rmain`.
sinkDepthFuncTracks the module-level sink depth func state owned by `miniquake.render.gl_rmain`.
sinkDepthMaxTracks the module-level sink depth max state owned by `miniquake.render.gl_rmain`.
sinkDepthMinTracks the module-level sink depth min state owned by `miniquake.render.gl_rmain`.
sinkHashTracks the module-level sink hash state owned by `miniquake.render.gl_rmain`.
sinkLastTextureTracks the module-level sink last texture state owned by `miniquake.render.gl_rmain`.
sinkScalarTracks the module-level sink scalar state owned by `miniquake.render.gl_rmain`.
sinkVerticesTracks the module-level sink vertices state owned by `miniquake.render.gl_rmain`.
function Subtract(left, right)Implements the `Subtract` operation for `miniquake.render.gl_rmain` (subtract).
| Parameter | Type | Default | Description |
|---|---|---|---|
left | dynamic | — | The left input consumed by `Subtract`. |
right | dynamic | — | The right input consumed by `Subtract`. |
trickFrameTracks the module-level trick frame state owned by `miniquake.render.gl_rmain`.
function Vertex(operation, point)Implements the `Vertex` operation for `miniquake.render.gl_rmain` (vertex).
| Parameter | Type | Default | Description |
|---|---|---|---|
operation | dynamic | — | The operation input consumed by `Vertex`. |
point | dynamic | — | The point input consumed by `Vertex`. |
vpnTracks the module-level vpn state owned by `miniquake.render.gl_rmain`.
vrightTracks the module-level vright state owned by `miniquake.render.gl_rmain`.
vupTracks the module-level vup state owned by `miniquake.render.gl_rmain`.
zTrickTracks the module-level z trick state owned by `miniquake.render.gl_rmain`.