CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererEnvironmentManager Class Referencefinal

A manager that controls all environments currently registered with the renderer. More...

#include <CeresEngine/Renderer/RendererEnvironment.hpp>

Inheritance diagram for CeresEngine::RendererEnvironmentManager:
CeresEngine::RendererSceneObjectManager CeresEngine::RendererObjectManager

Public Types

using ObjectType = RendererEnvironment
 

Public Member Functions

 RendererEnvironmentManager (Renderer &renderer)
 Creates a new instance of the RendererEnvironmentManager.
 
 ~RendererEnvironmentManager ()
 Destroys the RendererEnvironmentManager and releases all environments objects managed by it.
 
Async prepare (RendererContext &context)
 Prepares the environments for the rendering of the current frame.
 
template<typename... Args>
ObjectTypecreate (Args &&... args)
 Creates a new renderer object by calling it's constructor.
 
void destroy (const ObjectType &object)
 Destroys an existing renderer object by calling it's destructor and releasing it's memory.
 
- Public Member Functions inherited from CeresEngine::RendererObjectManager
 RendererObjectManager (Renderer &renderer) noexcept
 Creates a new RendererObjectManager instance.
 
virtual ~RendererObjectManager () noexcept=default
 Destroys an existing instance of RendererObjectManager.
 
RenderergetRenderer () const noexcept
 The renderer that owns this manager instance.
 

Private Types

using super = RendererSceneObjectManager
 

Private Member Functions

void markAsDirty (RendererEnvironment *const environment)
 Marks the given environment as dirty.
 

Private Attributes

Vector< UPtr< RendererSkyboxEnvironment > > mEnvironments
 A vector of all registered environments.
 

Friends

class RendererEnvironment
 

Additional Inherited Members

- Protected Member Functions inherited from CeresEngine::RendererObjectManager
void notifyChangeID (RendererObject &object, const RendererObjectID newID) noexcept
 Method called whenever the RendererObject ID changes.
 
- Protected Attributes inherited from CeresEngine::RendererObjectManager
RenderermRenderer
 The renderer that owns this manager instance.
 

Detailed Description

A manager that controls all environments currently registered with the renderer.

Member Typedef Documentation

◆ ObjectType

◆ super

Constructor & Destructor Documentation

◆ RendererEnvironmentManager()

CeresEngine::RendererEnvironmentManager::RendererEnvironmentManager ( Renderer renderer)
explicit

Creates a new instance of the RendererEnvironmentManager.

◆ ~RendererEnvironmentManager()

CeresEngine::RendererEnvironmentManager::~RendererEnvironmentManager ( )

Destroys the RendererEnvironmentManager and releases all environments objects managed by it.

Member Function Documentation

◆ create()

template<typename... Args>
ObjectType & CeresEngine::RendererEnvironmentManager::create ( Args &&...  args)
inline

Creates a new renderer object by calling it's constructor.

with args.

Template Parameters
ArgsThe argument types to be passed to the object constructor.
Parameters
argsThe arguments to be passed to the object constructor.
Returns
A reference to the newly created object. Must be destroyed by calling destroy on the object.

◆ destroy()

void CeresEngine::RendererEnvironmentManager::destroy ( const ObjectType object)
inline

Destroys an existing renderer object by calling it's destructor and releasing it's memory.

Parameters
objectThe renderer object to be destroyed.

◆ markAsDirty()

void CeresEngine::RendererEnvironmentManager::markAsDirty ( RendererEnvironment *const  environment)
private

Marks the given environment as dirty.

It will be updated on the next frame.

◆ prepare()

Async CeresEngine::RendererEnvironmentManager::prepare ( RendererContext context)

Prepares the environments for the rendering of the current frame.

This will update uniform buffers and perform any other necessary operations necessary for rendering.

Parameters
contextA context struct that contains parameters given by the renderer.

Friends And Related Symbol Documentation

◆ RendererEnvironment

Member Data Documentation

◆ mEnvironments

Vector<UPtr<RendererSkyboxEnvironment> > CeresEngine::RendererEnvironmentManager::mEnvironments
private

A vector of all registered environments.

Indices in this vector represent the renderer ID of the object.


The documentation for this class was generated from the following file: