# ConfigureEnhancedParticles
function ConfigureEnhancedParticles(enabled)Switch particle presentation without changing the simulation particle list.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
src/miniquake/render/particles.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlminiquake/types.ml as t → src/miniquake/types.mlfunction ConfigureEnhancedParticles(enabled)Switch particle presentation without changing the simulation particle list.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
dotTextureTracks the module-level dot texture state owned by `miniquake.render.particles`.
function drawParticleBatch(count, viewOrigin, viewForward, viewUp, viewRight)Submit the populated prefix of the reusable particle staging buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of entries or units to process. |
viewOrigin | dynamic | — | The view origin input consumed by `drawParticleBatch`. |
viewForward | dynamic | — | The view forward input consumed by `drawParticleBatch`. |
viewUp | dynamic | — | The view up input consumed by `drawParticleBatch`. |
viewRight | dynamic | — | The view right input consumed by `drawParticleBatch`. |
enhancedParticlesTracks the module-level enhanced particles state owned by `miniquake.render.particles`.
function ensureParticleBatch()Allocate the reusable particle staging buffer before the first rendered effect.
function paletteColor(palette, index)Implements the `paletteColor` operation for `miniquake.render.particles` (palette color).
| Parameter | Type | Default | Description |
|---|---|---|---|
palette | dynamic | — | The palette input consumed by `paletteColor`. |
index | dynamic | — | Zero-based index of the requested entry. |
const PARTICLE_BATCH_CAPACITY = 8192Defines the particle batch capacity value used by `miniquake.render.particles`.
const PARTICLE_BATCH_RECORD_BYTES = 16Defines the particle batch record bytes value used by `miniquake.render.particles`.
particleBatchAllocate this sizeable scratch buffer on first use. Keeping it out of the module initializer also keeps command-line/file inspection tools lightweight.
inline function particleBatchFloatBits(value)Return particle batch float bits derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `particleBatchFloatBits`. |
function particleGeometry(particle, viewOrigin, viewForward, viewUp, viewRight)Implements the `particleGeometry` operation for `miniquake.render.particles` (particle geometry).
| Parameter | Type | Default | Description |
|---|---|---|---|
particle | dynamic | — | The particle input consumed by `particleGeometry`. |
viewOrigin | dynamic | — | The view origin input consumed by `particleGeometry`. |
viewForward | dynamic | — | The view forward input consumed by `particleGeometry`. |
viewUp | dynamic | — | The view up input consumed by `particleGeometry`. |
viewRight | dynamic | — | The view right input consumed by `particleGeometry`. |
particleTextureTracks the module-level particle texture state owned by `miniquake.render.particles`.
function particleTexturePixels()Implements the `particleTexturePixels` operation for `miniquake.render.particles` (particle texture pixels).
function prepareParticleTextureState()Restore the single-texture state assumed by GLQuake's particle pass.
inline function putParticleBatchWord(offset, value)Encode and write particle batch word.
| Parameter | Type | Default | Description |
|---|---|---|---|
offset | dynamic | — | Zero-based offset of the requested data. |
value | dynamic | — | Value consumed by `putParticleBatchWord`. |
function R_DrawParticlesTrace(particles, viewOrigin, viewForward, viewUp, viewRight)Apply the Quake-compatible r draw particles trace behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
particles | dynamic | — | The particles input consumed by `R_DrawParticlesTrace`. |
viewOrigin | dynamic | — | The view origin input consumed by `R_DrawParticlesTrace`. |
viewForward | dynamic | — | The view forward input consumed by `R_DrawParticlesTrace`. |
viewUp | dynamic | — | The view up input consumed by `R_DrawParticlesTrace`. |
viewRight | dynamic | — | The view right input consumed by `R_DrawParticlesTrace`. |
function R_InitParticleTexture()Implements the `R_InitParticleTexture` operation for `miniquake.render.particles` (r init particle texture).
function R_ShutdownParticleTexture()Release the particle texture before the active renderer context is replaced.
function render(particles, palette)Compatibility entry point used by the integrated renderer until its view vectors are passed explicitly.
| Parameter | Type | Default | Description |
|---|---|---|---|
particles | dynamic | — | The particles input consumed by `render`. |
palette | dynamic | — | The palette input consumed by `render`. |
function renderTemporary(effects, currentTime, palette)Render temporary.
| Parameter | Type | Default | Description |
|---|---|---|---|
effects | dynamic | — | The effects input consumed by `renderTemporary`. |
currentTime | dynamic | — | Time value used by the operation. |
palette | dynamic | — | The palette input consumed by `renderTemporary`. |
function renderView(particles, palette, viewOrigin, viewForward, viewUp, viewRight)Render view.
| Parameter | Type | Default | Description |
|---|---|---|---|
particles | dynamic | — | The particles input consumed by `renderView`. |
palette | dynamic | — | The palette input consumed by `renderView`. |
viewOrigin | dynamic | — | The view origin input consumed by `renderView`. |
viewForward | dynamic | — | The view forward input consumed by `renderView`. |
viewUp | dynamic | — | The view up input consumed by `renderView`. |
viewRight | dynamic | — | The view right input consumed by `renderView`. |
function softParticleTexturePixels()Build a softly feathered circular sprite for the Enhanced particle pass.