struct
TRendererObjectECSSyncBatch
template<typename FullUpdateChannelType, typename ...PartialUpdateChannelTypes>Helper object used for synchronizing data from ECS entity/fragments on the main thread to packed arrays stored in RendererObjectStorage on the render thread.
A single sync batch contains:
- A list of renderer IDs that were allocated and deallocated since the last batch. See RendererObjectStorage.
- One or multiple sync channels, containing data used for updating live objects on the render thread. See TRendererObjectECSSyncChannel.
The intended use of this helper is inside RendererObjectStorage::SyncRead/SyncWrite method implementations.
Template parameters
FullUpdateChannelType | Channel that syncs all the data from the main thread to the render thread object. This is the default channel that must always exist. A full channel sync is always sent after a new object is allocated. |
|---|---|
PartialUpdateChannelTypes | Zero or more TRendererObjectSyncChannels that can be used for partial property synchronization (e.g. if object transform changes a channel that only sends transform updates, acting as a fast path). If a full update is scheduled for the same object, partial update channels are ignored. |
Public
Methods
staticRead
Allocates a TRendererObjectECSSyncBatch buffer using the provided .
Flushes renderer ID allocation/deallocation commands from and stores them into the sync batch. Performs read operations on all channels, storing their sync data in the sync batch. Clears all dirty tags used by the channels. Returns nullptr if nothing is dirty.