|
CeresEngine 0.2.0
A game development framework
|
A class that represents a environment inside the renderer. More...
#include <CeresEngine/Renderer/RendererEnvironment.hpp>
Public Member Functions | |
| RendererEnvironment (RendererEnvironmentManager &manager, RendererScene &scene) | |
| Creates a new RendererEnvironment. | |
| virtual | ~RendererEnvironment () |
| Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources. | |
| void | synchronize (const EnvironmentComponent &component) |
| Update the renderer environment with data from a transform and the component. | |
| virtual void | prepare (RendererContext &context) |
| Prepares the environment for the rendering of the current frame. | |
| virtual const GPUUniformBuffer & | getUniformBuffer () const =0 |
| The uniform buffer storing the environment GPU parameters used by the renderer. | |
| virtual RendererEnvironmentType | getType () const noexcept=0 |
| Determines the type of environment. | |
| const RendererEnvironmentDirtyFlags & | getDirtyFlags () const noexcept |
| A set of flags that represent the dirty portions of the object. | |
| bool | isDirty () const noexcept |
| void | markAsDirty (const RendererEnvironmentDirtyFlags &flags=RendererEnvironmentDirtyFlag::All) noexcept |
Public Member Functions inherited from CeresEngine::TRendererSceneObject< RendererEnvironment > | |
| 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. | |
Protected Member Functions | |
| GPUImagePtr | equirectangularToCubeMap (RendererContext &context, const GPUImagePtr &environmentMap) |
| GPUImagePtr | prefilterIrradianceMap (RendererContext &context, const GPUImagePtr &environmentMap) |
Generates a diffuse irradiance map for the given environmentMap. | |
| GPUImagePtr | prefilterRadianceMap (RendererContext &context, const GPUImagePtr &environmentMap) |
Generates a specular pre-filtered reflection map using environmentMap as a base. | |
Protected Attributes | |
| EnvironmentComponent | mComponent |
| A copy of the latest environment component. | |
| RendererEnvironmentDirtyFlags | mDirtyFlags = RendererEnvironmentDirtyFlag::All |
| A set of flags that represent the dirty portions of the object. | |
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. | |
Private Types | |
| using | super = TRendererSceneObject< RendererEnvironment > |
Friends | |
| class | RendererEnvironmentManager |
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. | |
A class that represents a environment inside the renderer.
The environment can be either captured during runtime or stored in a texture.
|
explicit |
Creates a new RendererEnvironment.
| manager | The owning manager. |
| scene | A reference to the owning scene. |
|
virtual |
Destroys the renderer environment and releases any renderer (and RenderAPI)-related resources.
|
protected |
|
inlinenoexcept |
A set of flags that represent the dirty portions of the object.
|
pure virtualnoexcept |
Determines the type of environment.
Implemented in CeresEngine::RendererSkyboxEnvironment.
|
pure virtual |
The uniform buffer storing the environment GPU parameters used by the renderer.
Implemented in CeresEngine::RendererSkyboxEnvironment.
|
inlinenoexcept |
|
noexcept |
|
protected |
Generates a diffuse irradiance map for the given environmentMap.
| context | The renderer context to execute the irradiance map generation on. |
| environmentMap | The environment map to be used as a base to generate the irradiance map. |
|
protected |
Generates a specular pre-filtered reflection map using environmentMap as a base.
| context | The renderer context to execute the prefiltered map generation on. |
| environmentMap | The environment map to be used as a base to generate the pre-filtered reflection map. |
|
virtual |
Prepares the environment for the rendering of the current frame.
This will update uniform buffers and perform any other necessary operations necessary for rendering.
| context | A context struct that contains parameters given by the renderer. |
Reimplemented in CeresEngine::RendererSkyboxEnvironment.
| void CeresEngine::RendererEnvironment::synchronize | ( | const EnvironmentComponent & | component | ) |
Update the renderer environment with data from a transform and the component.
RenderingSystem during a synchronization point.| transform | The environment transform. |
| component | The environment component. |
|
protected |
A copy of the latest environment component.
|
protected |
A set of flags that represent the dirty portions of the object.