|
CeresEngine 0.2.0
A game development framework
|
A class that represents a light inside the renderer. More...
#include <CeresEngine/Renderer/RendererLight.hpp>
Public Member Functions | |
| RendererLight (RendererLightManager &manager, RendererScene &scene) | |
| Creates a new RendererLight. | |
| ~RendererLight () noexcept final | |
| Destroys the renderer light and releases any renderer (and RenderAPI)-related resources. | |
| void | synchronize (const Transform &transform, const LightComponent &component) |
| Update the renderer light with data from a transform and the component. | |
| void | prepare (RendererContext &context) |
| Prepares the light for the rendering of the current frame. | |
| void | renderShadow (GPUCommandBuffer &commandBuffer) |
| LightComponent | getComponent () const |
| A copy of the latest light component. | |
| const RendererLightSettings & | getSettings () const |
| const RendererLightFlags & | getFlags () const noexcept |
| A set of flags that customize and represent the state of the object. | |
| void | setFlags (const RendererLightFlags &flags) |
| A set of flags that customize and represent the state of the object. | |
| const RendererLightDirtyFlags & | getDirtyFlags () const noexcept |
| A set of flags that represent the dirty portions of the object. | |
| bool | isDirty () const noexcept |
| If set to true, the light is dirty and needs to be synchronized from the entity. | |
| void | markAsDirty (const RendererLightDirtyFlags &flags=RendererLightDirtyFlag::All) noexcept |
| If set to true, the light is dirty and needs to be synchronized from the entity. | |
| const RendererLightInfo & | getInfo () const |
| A structure that holds renderer-specific information for the light. | |
| RendererLightInfo & | getInfo () |
| A structure that holds renderer-specific information for the light. | |
| const GPUBindlessBuffer & | getUniformBuffer () const |
| The uniform buffer storing the light GPU parameters used by the renderer. | |
| Sphere | getBoundingSphere () const |
| Gets the renderable bounding sphere. | |
| const GPUImagePtr & | getShadowMap () const |
| A device image that holds the rendered shadow map. | |
| void | setShadowMap (const GPUImagePtr &shadowMap) |
| A device image that holds the rendered shadow map. | |
Public Member Functions inherited from CeresEngine::TRendererSceneObject< RendererLight > | |
| TRendererSceneObject (Args &&... args) | |
Creates a new TRendererSceneObject instance. | |
| ~TRendererSceneObject () noexcept override | |
Destroys an existing TRendererSceneObject instance. | |
Public Member Functions inherited from CeresEngine::TRendererObject< SelfType, BaseType > | |
| template<typename... Args> | |
| TRendererObject (ManagerType &manager, Args &&... args) | |
Creates a new TRendererObject instance. | |
| void | destroy () noexcept override |
Destroys the RendererObject. | |
| ManagerType & | getManager () const noexcept |
| The owning object manager. | |
Public Member Functions inherited from CeresEngine::RendererObject | |
| RendererObject ()=default | |
Creates a new RendererObject instance. | |
| virtual | ~RendererObject () noexcept=default |
Destroys an existing RendererObject instance. | |
| RendererObjectID | getID () const noexcept |
| An identifier that uniquely identifies this object in the renderer. | |
Private Types | |
| using | super = TRendererSceneObject< RendererLight > |
Private Attributes | |
| LightComponent | mComponent |
| A copy of the latest light component. | |
| RendererLightFlags | mFlags |
| A set of flags that customize and represent the state of the object. | |
| RendererLightDirtyFlags | mDirtyFlags = RendererLightDirtyFlag::All |
| A set of flags that represent the dirty portions of the object. | |
| bool | mDirty = true |
| If set to true, the light is dirty and needs to be synchronized from the entity. | |
| RendererLightInfo | mInfo |
| A structure that holds renderer-specific information for the light. | |
| RendererLightParams | mParameters |
| The GPU parameters. Will be copied to the GPU uniform buffer. | |
| GPUDynamicBindlessBuffer< RendererLightParams > | mUniformBuffer |
| The uniform buffer storing the light GPU parameters used by the renderer. | |
| GPUImagePtr | mShadowMap = nullptr |
| A device image that holds the rendered shadow map. | |
Friends | |
| class | RendererLightManager |
Additional Inherited Members | |
Public Attributes inherited from CeresEngine::RendererObject | |
| Event< void(RendererObjectID newID)> | willChangeID |
| An event called whenever the object is about to change it's ID. | |
| Event< void(RendererObjectID oldID)> | didChangeID |
| An event called whenever the object changes it's ID. | |
Protected Attributes inherited from CeresEngine::TRendererObject< SelfType, BaseType > | |
| ManagerType & | mManager |
| The owning object manager. | |
Protected Attributes inherited from CeresEngine::RendererObject | |
| RendererObjectID | mID |
| An identifier that uniquely identifies this object in the renderer. | |
A class that represents a light inside the renderer.
|
explicit |
Creates a new RendererLight.
| manager | The owning manager. |
| scene | A reference to the owning scene. |
|
finalnoexcept |
Destroys the renderer light and releases any renderer (and RenderAPI)-related resources.
| Sphere CeresEngine::RendererLight::getBoundingSphere | ( | ) | const |
Gets the renderable bounding sphere.
|
inline |
A copy of the latest light component.
|
inlinenoexcept |
A set of flags that represent the dirty portions of the object.
|
inlinenoexcept |
A set of flags that customize and represent the state of the object.
|
inline |
A structure that holds renderer-specific information for the light.
|
inline |
A structure that holds renderer-specific information for the light.
|
inline |
|
inline |
A device image that holds the rendered shadow map.
|
inline |
The uniform buffer storing the light GPU parameters used by the renderer.
|
inlinenoexcept |
If set to true, the light is dirty and needs to be synchronized from the entity.
|
noexcept |
If set to true, the light is dirty and needs to be synchronized from the entity.
| void CeresEngine::RendererLight::prepare | ( | RendererContext & | context | ) |
Prepares the light for the rendering of the current frame.
This will update uniform buffers and perform any other necessary operations necessary for rendering. All prepared data must be view independent.
| context | A context struct that contains parameters given by the renderer. |
| void CeresEngine::RendererLight::renderShadow | ( | GPUCommandBuffer & | commandBuffer | ) |
| void CeresEngine::RendererLight::setFlags | ( | const RendererLightFlags & | flags | ) |
A set of flags that customize and represent the state of the object.
| void CeresEngine::RendererLight::setShadowMap | ( | const GPUImagePtr & | shadowMap | ) |
A device image that holds the rendered shadow map.
| void CeresEngine::RendererLight::synchronize | ( | const Transform & | transform, |
| const LightComponent & | component | ||
| ) |
Update the renderer light with data from a transform and the component.
RenderingSystem during a synchronization point.| transform | The light transform. |
| component | The light component. |
|
friend |
|
private |
A copy of the latest light component.
If set to true, the light is dirty and needs to be synchronized from the entity.
|
private |
A set of flags that represent the dirty portions of the object.
|
private |
A set of flags that customize and represent the state of the object.
|
private |
A structure that holds renderer-specific information for the light.
|
private |
The GPU parameters. Will be copied to the GPU uniform buffer.
|
private |
A device image that holds the rendered shadow map.
|
private |
The uniform buffer storing the light GPU parameters used by the renderer.