MiniQuake

src/miniquake/render/particles.ml

Package
miniquake.render.particles
Reachable
Yes

Imports

Declarations

ConfigureEnhancedParticles

function ConfigureEnhancedParticles(enabled)

Switch particle presentation without changing the simulation particle list.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

dotTexture

dotTexture

Tracks the module-level dot texture state owned by `miniquake.render.particles`.

View source

drawParticleBatch

function drawParticleBatch(count, viewOrigin, viewForward, viewUp, viewRight)

Submit the populated prefix of the reusable particle staging buffer.

ParameterTypeDefaultDescription
countdynamic—Number of entries or units to process.
viewOrigindynamic—The view origin input consumed by `drawParticleBatch`.
viewForwarddynamic—The view forward input consumed by `drawParticleBatch`.
viewUpdynamic—The view up input consumed by `drawParticleBatch`.
viewRightdynamic—The view right input consumed by `drawParticleBatch`.

View source

enhancedParticles

enhancedParticles

Tracks the module-level enhanced particles state owned by `miniquake.render.particles`.

View source

ensureParticleBatch

function ensureParticleBatch()

Allocate the reusable particle staging buffer before the first rendered effect.

View source

paletteColor

function paletteColor(palette, index)

Implements the `paletteColor` operation for `miniquake.render.particles` (palette color).

ParameterTypeDefaultDescription
palettedynamic—The palette input consumed by `paletteColor`.
indexdynamic—Zero-based index of the requested entry.

View source

PARTICLE_BATCH_CAPACITY

const PARTICLE_BATCH_CAPACITY = 8192

Defines the particle batch capacity value used by `miniquake.render.particles`.

View source

PARTICLE_BATCH_RECORD_BYTES

const PARTICLE_BATCH_RECORD_BYTES = 16

Defines the particle batch record bytes value used by `miniquake.render.particles`.

View source

particleBatch

particleBatch

Allocate this sizeable scratch buffer on first use. Keeping it out of the module initializer also keeps command-line/file inspection tools lightweight.

View source

particleBatchFloatBits

inline function particleBatchFloatBits(value)

Return particle batch float bits derived from the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `particleBatchFloatBits`.

View source

particleGeometry

function particleGeometry(particle, viewOrigin, viewForward, viewUp, viewRight)

Implements the `particleGeometry` operation for `miniquake.render.particles` (particle geometry).

ParameterTypeDefaultDescription
particledynamic—The particle input consumed by `particleGeometry`.
viewOrigindynamic—The view origin input consumed by `particleGeometry`.
viewForwarddynamic—The view forward input consumed by `particleGeometry`.
viewUpdynamic—The view up input consumed by `particleGeometry`.
viewRightdynamic—The view right input consumed by `particleGeometry`.

View source

particleTexture

particleTexture

Tracks the module-level particle texture state owned by `miniquake.render.particles`.

View source

particleTexturePixels

function particleTexturePixels()

Implements the `particleTexturePixels` operation for `miniquake.render.particles` (particle texture pixels).

View source

prepareParticleTextureState

function prepareParticleTextureState()

Restore the single-texture state assumed by GLQuake's particle pass.

View source

putParticleBatchWord

inline function putParticleBatchWord(offset, value)

Encode and write particle batch word.

ParameterTypeDefaultDescription
offsetdynamic—Zero-based offset of the requested data.
valuedynamic—Value consumed by `putParticleBatchWord`.

View source

R_DrawParticlesTrace

function R_DrawParticlesTrace(particles, viewOrigin, viewForward, viewUp, viewRight)

Apply the Quake-compatible r draw particles trace behavior.

ParameterTypeDefaultDescription
particlesdynamic—The particles input consumed by `R_DrawParticlesTrace`.
viewOrigindynamic—The view origin input consumed by `R_DrawParticlesTrace`.
viewForwarddynamic—The view forward input consumed by `R_DrawParticlesTrace`.
viewUpdynamic—The view up input consumed by `R_DrawParticlesTrace`.
viewRightdynamic—The view right input consumed by `R_DrawParticlesTrace`.

View source

R_InitParticleTexture

function R_InitParticleTexture()

Implements the `R_InitParticleTexture` operation for `miniquake.render.particles` (r init particle texture).

View source

R_ShutdownParticleTexture

function R_ShutdownParticleTexture()

Release the particle texture before the active renderer context is replaced.

View source

render

function render(particles, palette)

Compatibility entry point used by the integrated renderer until its view vectors are passed explicitly.

ParameterTypeDefaultDescription
particlesdynamic—The particles input consumed by `render`.
palettedynamic—The palette input consumed by `render`.

View source

renderTemporary

function renderTemporary(effects, currentTime, palette)

Render temporary.

ParameterTypeDefaultDescription
effectsdynamic—The effects input consumed by `renderTemporary`.
currentTimedynamic—Time value used by the operation.
palettedynamic—The palette input consumed by `renderTemporary`.

View source

renderView

function renderView(particles, palette, viewOrigin, viewForward, viewUp, viewRight)

Render view.

ParameterTypeDefaultDescription
particlesdynamic—The particles input consumed by `renderView`.
palettedynamic—The palette input consumed by `renderView`.
viewOrigindynamic—The view origin input consumed by `renderView`.
viewForwarddynamic—The view forward input consumed by `renderView`.
viewUpdynamic—The view up input consumed by `renderView`.
viewRightdynamic—The view right input consumed by `renderView`.

View source

softParticleTexturePixels

function softParticleTexturePixels()

Build a softly feathered circular sprite for the Enhanced particle pass.

View source