class render::RendererScene

Inherits: RenderProxy

Contains information about the scene (e.g. renderables, lights, cameras) required by the renderer.

Public

Methods

~RendererScene

virtual ~RendererScene() noexcept = default

GetRenderableStorage

const SPtr<RenderableObjectStorageBase> &GetRenderableStorage() const

Returns the renderable object storage for this scene.

GetLightStorage

const SPtr<LightObjectStorageBase> &GetLightStorage() const

Returns the light object storage for this scene.

GetDecalStorage

const SPtr<DecalObjectStorageBase> &GetDecalStorage() const

Returns the decal object storage for this scene.

GetParticleSystemStorage

const SPtr<ParticleSystemObjectStorageBase> &GetParticleSystemStorage() const

Returns the particle system object storage for this scene.

GetReflectionProbeStorage

const SPtr<ReflectionProbeObjectStorageBase> &GetReflectionProbeStorage() const

Returns the reflection probe object storage for this scene.

SyncWrite

void SyncWrite(RendererSceneSyncData &batchData, FrameAllocator &allocator)

Applies sync data from SyncRead to render-thread representations and frees frame-allocated memory.

RegisterCamera

virtual void RegisterCamera(Camera *camera) = 0

Registers a new camera in the scene.

UpdateCamera

virtual void UpdateCamera(Camera *camera, u32 updateFlag) = 0

Updates information about a previously registered camera.

UnregisterCamera

virtual void UnregisterCamera(Camera *camera) = 0

Removes a camera from the scene.

RegisterLightProbeVolume

virtual void RegisterLightProbeVolume(LightProbeVolume *volume) = 0

Registers a new light probe volume in the scene.

UpdateLightProbeVolume

virtual void UpdateLightProbeVolume(LightProbeVolume *volume) = 0

Updates information about a previously registered light probe volume.

UnregisterLightProbeVolume

virtual void UnregisterLightProbeVolume(LightProbeVolume *volume) = 0

Removes a light probe volume from the scene.

RegisterSkybox

virtual void RegisterSkybox(Skybox *skybox) = 0

Registers a new sky texture in the scene.

UnregisterSkybox

virtual void UnregisterSkybox(Skybox *skybox) = 0

Removes a skybox from the scene.

AddExtension

void AddExtension(RendererExtension *extension)

Registers an extension object that will be called every frame, for view in this scene.

Allows external code to perform custom rendering interleaved with the renderer's output.

RemoveExtension

void RemoveExtension(RendererExtension *extension)

Unregisters an extension registered with AddRendererExtension().

UpdateCombinedRendererExtensionsIfNeeded

void UpdateCombinedRendererExtensionsIfNeeded(const Set<RendererExtension *, RendererExtension::SortFunction> &globalRendererExtensions, bool forceUpdate = false)

Updates the combined extension list if required.

Combined extension list contains extensions specific to the scene and global renderer ones. This will rebuild the internal list if the per-scene extensions have changed since the last call, or if is true. should be true if has changed since the last time this method was called.

GetCombinedRendererExtensions

const Set<RendererExtension *, RendererExtension::SortFunction> &GetCombinedRendererExtensions() const

Returns a list of renderer extensions that includes both the global renderer extensions, and the per-scene extensions.

Make sure to call UpdateCombinedRendererExtensionsIfNeeded() before this method, if extension list has been modified.

Protected

Constructors

RendererScene

RendererScene() = default

Fields

mDecalStorage

SPtr<DecalObjectStorageBase> mDecalStorage

mRenderableStorage

SPtr<RenderableObjectStorageBase> mRenderableStorage

mLightStorage

SPtr<LightObjectStorageBase> mLightStorage

mParticleSystemStorage

SPtr<ParticleSystemObjectStorageBase> mParticleSystemStorage

mReflectionProbeStorage

SPtr<ReflectionProbeObjectStorageBase> mReflectionProbeStorage

mRendererExtensions

mCombinedRendererExtensions

Set<RendererExtension *, RendererExtension::SortFunction> mCombinedRendererExtensions

Transient set of per-scene and global renderer extensions.

mCombinedRendererExtensionsDirty

bool mCombinedRendererExtensionsDirty