#include <bx/allocator.h>
#include <bx/bounds.h>
#include <bx/easing.h>
#include <bx/rng.h>
#include <bgfx/bgfx.h>
#include <math/gradient.h>
#include <math/math.h>
#include <math/bbox.h>
#include <core/base/basetypes.hpp>
Go to the source code of this file.
|
| template<typename Ty > |
| bool | isValid (Ty _handle) |
| |
| void | psInit (uint16_t _maxEmitters=64, bx::AllocatorI *_allocator=nullptr) |
| |
| void | psShutdown () |
| |
| EmitterHandle | psCreateEmitter (EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles) |
| |
| void | psUpdateEmitter (EmitterHandle _handle, float _dt, EmitterUniforms *_uniforms=nullptr) |
| |
| bool | psHasUpdated (EmitterHandle _handle) |
| |
| void | psResetEmitter (EmitterHandle _handle) |
| |
| void | psGetAabb (EmitterHandle _handle, math::bbox &_outAabb) |
| |
| uint32_t | psGetNumParticles (EmitterHandle _handle) |
| |
| void | psDestroyEmitter (EmitterHandle _handle) |
| |
| uint32_t | psRenderEmitterBatch (const EmitterHandle *_handles, uint32_t _count, uint8_t _view, bgfx::ProgramHandle _program, const float *_mtxView, const math::vec3 &_eye, bgfx::TextureHandle _texture, uint64_t _blend_state, bool _sort_by_depth=true) |
| |
◆ isValid()
template<typename Ty >
| bool isValid |
( |
Ty | _handle | ) |
|
|
inline |
◆ psCreateEmitter()
◆ psDestroyEmitter()
◆ psGetAabb()
◆ psGetNumParticles()
◆ psHasUpdated()
◆ psInit()
| void psInit |
( |
uint16_t | _maxEmitters = 64, |
|
|
bx::AllocatorI * | _allocator = nullptr ) |
◆ psRenderEmitterBatch()
| uint32_t psRenderEmitterBatch |
( |
const EmitterHandle * | _handles, |
|
|
uint32_t | _count, |
|
|
uint8_t | _view, |
|
|
bgfx::ProgramHandle | _program, |
|
|
const float * | _mtxView, |
|
|
const math::vec3 & | _eye, |
|
|
bgfx::TextureHandle | _texture, |
|
|
uint64_t | _blend_state, |
|
|
bool | _sort_by_depth = true ) |
Submit one homogeneous particle batch: same texture, TextureMode (mask vs multi-channel), and BlendMode. RenderMode is per-instance. The pipeline groups emitters by material. When _sort_by_depth is true, instances are sorted back-to-front (sequential for small counts, parallel above a threshold) then gathered into the instance buffer. When false, particles are streamed directly from each emitter's array in emission order (additive / order-independent blends) with no sort-key scratch. May issue multiple submits if the transient instance buffer is smaller than the particle count.
Definition at line 1607 of file particle_system.cpp.
◆ psResetEmitter()
◆ psShutdown()
◆ psUpdateEmitter()