24 class RendererSceneManager;
98 template<
typename T>
void add(
T&
object);
#define CE_DECL_RENDERER_OBJECT(T)
Definition RendererObject.hpp:25
Definition GPUBufferObject.hpp:562
A generator represents a coroutine type that produces a sequence of values of type T,...
Definition Generator.hpp:50
A class that represents a environment inside the renderer.
Definition RendererEnvironment.hpp:67
The CeresEngine renderer.
Definition Renderer.hpp:35
A class that represents a scene inside the renderer.
Definition RendererScene.hpp:34
void add(T &object)
Adds a new object to the scene.
RendererEnvironment * getEnvironment() const noexcept
A pointer to the sky environment for the scene.
Definition RendererScene.hpp:78
void onSkyTextureChanged()
const Vector< RendererTerrain * > & getTerrains()
Enumerates the currently registered terrains.
Definition RendererScene.hpp:117
const GPUUniformBuffer & getUniformBuffer() const
The uniform buffer storing the scene GPU parameters used by the renderer.
Definition RendererScene.hpp:145
const RendererSceneInfo & getInfo() const
A structure that holds renderer-specific information for the scene.
Definition RendererScene.hpp:139
RendererSceneInfo & getInfo()
A structure that holds renderer-specific information for the scene.
Definition RendererScene.hpp:142
T & create()
Creates a new renderer object of the given type T.
Vector< RendererEnvironment * > mEnvironments
The set of registered terrains with the renderer scene.
Definition RendererScene.hpp:62
bool isDirty() const noexcept
If set to true, the scene is dirty and needs to be synchronized from the entity.
Definition RendererScene.hpp:133
Vector< RendererRenderable * > mRenderables
The set of registered renderables with the renderer scene.
Definition RendererScene.hpp:56
void remove(T &object)
Removes an existing object from the scene.
RendererSceneInfo mInfo
A structure that holds renderer-specific information for the scene.
Definition RendererScene.hpp:43
Vector< RendererCamera * > mCameras
The set of registered cameras with the renderer scene.
Definition RendererScene.hpp:50
const Vector< RendererRenderable * > & getRenderables()
Enumerates the currently registered renderables.
Definition RendererScene.hpp:114
const Vector< RendererCamera * > & getCameras()
Enumerates the currently registered cameras.
Definition RendererScene.hpp:108
Vector< RendererLight * > mLights
The set of registered lights with the renderer scene.
Definition RendererScene.hpp:53
GPUDynamicUniformBuffer< RendererSceneParams > mUniformBuffer
The uniform buffer storing the scene GPU parameters used by the renderer.
Definition RendererScene.hpp:46
Vector< RendererTerrain * > mTerrains
The set of registered terrains with the renderer scene.
Definition RendererScene.hpp:59
const Vector< RendererLight * > & getLights()
Enumerates the currently registered lights.
Definition RendererScene.hpp:111
const Vector< RendererEnvironment * > & getEnvironments()
Enumerates the currently registered environments.
Definition RendererScene.hpp:120
bool mDirty
If set to true, the scene is dirty and needs to be synchronized from the entity.
Definition RendererScene.hpp:40
void prepare(RendererContext &context)
Prepares the scene for the rendering of the current frame.
Renderer & getRenderer() const
The renderer that owns this manager instance.
Generator< RendererGeometry > enumerateGeometry(const RendererGeometryEnumerationRequest &enumerationRequest=RendererGeometryEnumerationRequest()) const
void markAsDirty() noexcept
If set to true, the scene is dirty and needs to be synchronized from the entity.
Definition RendererScene.hpp:136
A manager that controls all scenes currently registered with the renderer.
Definition RendererScene.hpp:156
RendererSceneManager(Renderer &renderer)
Creates a new instance of the RendererSceneManager.
Async prepare(RendererContext &context)
Prepares the scenes for the rendering of the current frame.
Vector< UPtr< RendererScene > > mScenes
A list of scenes currently registered with the renderer.
Definition RendererScene.hpp:161
~RendererSceneManager() final
Destroys the RendererSceneManager and releases all GPU resources managed and allocated by it.
Generator< RendererScene & > enumerateScenes()
Enumerates the currently registered scenes.
Template class to help implement sub-classes of RendererObject.
Definition RendererObject.hpp:82
Template class to help implement sub-classes of RendererObjectManager.
Definition RendererObject.hpp:136
Template class to help implement sub-classes of RendererSceneObject.
Definition RendererSceneObject.hpp:47
Definition Application.hpp:19
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that contains context given by the renderer to render it's objects.
Definition Renderer.hpp:252
Parameters to customize a geometry enumeration request.
Definition RendererGeometry.hpp:47
A structure that holds renderer-specific information for the scene.
Definition RendererScene.hpp:31
A structure that mirrors the GPU uniform data for the scene.
Definition RendererScene.hpp:28