# createState
function createState()Creates state for `miniquake.render.gl_test`.
src/miniquake/render/gl_test.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlminiquake/types.ml as t → src/miniquake/types.mlminiquake/world_bsp.ml as world → src/miniquake/world_bsp.mlfunction createState()Creates state for `miniquake.render.gl_test`.
function DrawPuff(puff)Render puff.
| Parameter | Type | Default | Description |
|---|---|---|---|
puff | dynamic | — | The puff input consumed by `DrawPuff`. |
function emitVertex(point, drawNative)Add vertex to the destination state.
| Parameter | Type | Default | Description |
|---|---|---|---|
point | dynamic | — | The point input consumed by `emitVertex`. |
drawNative | dynamic | — | The draw native input consumed by `emitVertex`. |
function emptyPlane()Implements the `emptyPlane` operation for `miniquake.render.gl_test` (empty plane).
function emptyPuff()Implements the `emptyPuff` operation for `miniquake.render.gl_test` (empty puff).
miniquake.render.gl_test.GlTestState struct
function HitPlane(start, finish)Implements the `HitPlane` operation for `miniquake.render.gl_test` (hit plane).
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | The start input consumed by `HitPlane`. |
finish | dynamic | — | The finish input consumed by `HitPlane`. |
const MAX_PUFFS = 64Defines the max puffs value used by `miniquake.render.gl_test`.
function puffPoints(puff)Implements the `puffPoints` operation for `miniquake.render.gl_test` (puff points).
| Parameter | Type | Default | Description |
|---|---|---|---|
puff | dynamic | — | The puff input consumed by `puffPoints`. |
function Test_CommandTrace()Verify command trace against the expected Quake behavior.
function Test_Configure(worldMap, viewOrigin, frameTime, drawNative)Verify configure against the expected Quake behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldMap | dynamic | — | The world map input consumed by `Test_Configure`. |
viewOrigin | dynamic | — | The view origin input consumed by `Test_Configure`. |
frameTime | dynamic | — | Time value used by the operation. |
drawNative | dynamic | — | The draw native input consumed by `Test_Configure`. |
function Test_Draw()Verify draw against the expected Quake behavior.
function Test_Init()Verify init against the expected Quake behavior.
function Test_Spawn(origin)Verify spawn against the expected Quake behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
function Test_State()Verify state against the expected Quake behavior.
function Test_UseState(state)Verify use state against the expected Quake behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
state | dynamic | — | Mutable `miniquake.render.gl_test` state used by `Test_UseState`. |
miniquake.render.gl_test.TestPuff struct
testStateTracks the module-level renderer test state owned by `miniquake.render.gl_test`.
function zeroVector()Implements the `zeroVector` operation for `miniquake.render.gl_test` (zero vector).