class ParticleSystemObjectStorageBase

Contains render thread representation of particle system objects, stored in packed arrays accessible by PackedRendererId.

Implements main -> render thread synchronization logic for particle system objects.

Public

Methods

SyncRead

void *SyncRead(ecs::Registry &registry, FrameAllocator &allocator) override

Scans the provided registry for dirty objects, generates the update packets and stores them into a batch buffer allocated by .

Returns pointer to the batch buffer memory.

SyncWrite

void SyncWrite(void *batchData, FrameAllocator &allocator) override

Applies data from a batch buffer generated by SyncRead to objects on the render thread, and frees the frame-allocated batch data via .

GetParticleSystemProxy

render::ParticleSystemProxy &GetParticleSystemProxy(PackedRendererId slotId)

Returns the particle system proxy at the given slot.

GetParticleSystemProxy

const render::ParticleSystemProxy &GetParticleSystemProxy(PackedRendererId slotId) const

Returns the particle system proxy at the given slot (const).

GetParticleSystemCount

u32 GetParticleSystemCount() const

Returns the total number of particle systems.

CreateRenderState

virtual void CreateRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each new particle system being added, or a particle system whose data needs to be rebuilt after a significant update (in which case DestroyRenderState will be called first).

DestroyRenderState

virtual void DestroyRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each particle system that is being removed, or a particle system that needs to be rebuilt after a significant update (in which case CreateRenderState will be called right after).

UpdateRenderState

virtual void UpdateRenderState(TArrayView<const PackedRendererId> slotIds) = 0

Called once per frame for each particle system that needs to be updated after a minor update (e.g. a transform change).

Protected

Fields

mParticleSystemProxies