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

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

#include <CeresEngine/Renderer/RendererLight.hpp>

Inheritance diagram for CeresEngine::RendererLightManager:
CeresEngine::TRendererSceneObjectManager< RendererLightManager, RendererLight > CeresEngine::TRendererObjectManager< SelfType, ObjectType, BaseType > CeresEngine::RendererObjectManager

Public Member Functions

 RendererLightManager (Renderer &renderer)
 Creates a new instance of the RendererLightManager.
 
 ~RendererLightManager () noexcept final
 Destroys the RendererLightManager and releases all lights objects managed by it.
 
Async prepare (RendererContext &context)
 Prepares the lights for the rendering of the current frame.
 
Async renderShadows (RendererContext &context)
 
- Public Member Functions inherited from CeresEngine::TRendererObjectManager< SelfType, ObjectType, BaseType >
template<typename... Args>
 TRendererObjectManager (Vector< UPtr< ObjectType > > &objects, Args &&... args)
 Creates a new TRendererObjectManager instance.
 
template<typename... Args>
ObjectTypecreate (Args &&... args)
 Creates a new renderer object by calling it's constructor.
 
void destroy (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 = TRendererSceneObjectManager< RendererLightManager, RendererLight >
 
using UniformBufferType = GPUDynamicStridedBindlessBufferArray< RendererLightParams >
 The type used to store uniform buffers.
 

Private Member Functions

void markAsDirty (RendererLight *const light)
 Marks the given light as dirty.
 

Private Attributes

Vector< UPtr< RendererLight > > mLights
 A vector of all registered lights.
 
UniformBufferType mUniformBuffer
 The uniform buffer storing all light GPU parameters used by the renderer.
 

Friends

class RendererLight
 

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 lights currently registered with the renderer.

Member Typedef Documentation

◆ super

◆ UniformBufferType

Constructor & Destructor Documentation

◆ RendererLightManager()

CeresEngine::RendererLightManager::RendererLightManager ( Renderer renderer)
explicit

Creates a new instance of the RendererLightManager.

◆ ~RendererLightManager()

CeresEngine::RendererLightManager::~RendererLightManager ( )
finalnoexcept

Destroys the RendererLightManager and releases all lights objects managed by it.

Member Function Documentation

◆ markAsDirty()

void CeresEngine::RendererLightManager::markAsDirty ( RendererLight *const  light)
private

Marks the given light as dirty.

It will be updated on the next frame.

◆ prepare()

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

Prepares the lights 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.

◆ renderShadows()

Async CeresEngine::RendererLightManager::renderShadows ( RendererContext context)

Friends And Related Symbol Documentation

◆ RendererLight

Member Data Documentation

◆ mLights

Vector<UPtr<RendererLight> > CeresEngine::RendererLightManager::mLights
private

A vector of all registered lights.

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

◆ mUniformBuffer

UniformBufferType CeresEngine::RendererLightManager::mUniformBuffer
private

The uniform buffer storing all light GPU parameters used by the renderer.


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