|
CeresEngine 0.2.0
A game development framework
|
A class that represents a terrain inside the renderer. More...
#include <CeresEngine/Renderer/RendererTerrain.hpp>
Classes | |
| class | Element |
| The rendering element for the terrain chunks. More... | |
Public Member Functions | |
| RendererTerrain (RendererTerrainManager &manager, RendererScene &scene) | |
Creates a new RendererTerrain. | |
| ~RendererTerrain () noexcept final | |
| Destroys the renderer terrain and releases any renderer (and RenderAPI)-related resources. | |
| void | synchronize (const Transform &transform, const TerrainRenderableComponent &component) |
| Update the renderer terrain with data from a transform and the component. | |
| void | prepare (RendererContext &context) |
| Prepares the terrain for the rendering of the current frame. | |
| void | draw (GPUCommandBuffer &commandBuffer) |
| const RendererTerrainFlags & | getFlags () const noexcept |
| A set of flags that customize and represent the state of the object. | |
| void | setFlags (const RendererTerrainFlags &flags) |
| A set of flags that customize and represent the state of the object. | |
| const RendererTerrainDirtyFlags & | getDirtyFlags () const noexcept |
| A set of flags that represent the dirty portions of the object. | |
| bool | isDirty () const noexcept |
| If set to true, the terrain is dirty and needs to be synchronized from the entity. | |
| void | markAsDirty (const RendererTerrainDirtyFlags &flags=RendererTerrainDirtyFlag::All) noexcept |
| If set to true, the terrain is dirty and needs to be synchronized from the entity. | |
| const RendererTerrainInfo & | getInfo () const |
| A structure that holds renderer-specific information for the terrain. | |
| RendererTerrainInfo & | getInfo () |
| A structure that holds renderer-specific information for the terrain. | |
| const GPUBindlessBuffer & | getUniformBuffer () const |
| The uniform buffer storing the terrain GPU parameters used by the renderer. | |
| const SPtr< RendererMaterial > & | getMaterial () const noexcept |
| const Vector< UPtr< Element > > & | getElements () const noexcept |
Public Member Functions inherited from CeresEngine::TRendererSceneObject< RendererTerrain > | |
| 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< RendererTerrain > |
Private Attributes | |
| TerrainRenderableComponent | mComponent |
| A copy of the latest terrain component. | |
| RendererTerrainFlags | mFlags |
| A set of flags that customize and represent the state of the object. | |
| RendererTerrainDirtyFlags | mDirtyFlags = RendererTerrainDirtyFlag::All |
| A set of flags that represent the dirty portions of the object. | |
| bool | mDirty = true |
| If set to true, the terrain is dirty and needs to be synchronized from the entity. | |
| RendererTerrainInfo | mInfo |
| A structure that holds renderer-specific information for the terrain. | |
| RendererTerrainParams | mParameters |
| The GPU parameters. Will be copied to the GPU uniform buffer. | |
| GPUDynamicBindlessBuffer< RendererTerrainParams > | mUniformBuffer |
| The uniform buffer storing the terrain GPU parameters used by the renderer. | |
| SPtr< RendererMaterial > | mMaterial |
| Vector< UPtr< Element > > | mElements |
| bool | mInitialized = false |
Friends | |
| class | RendererTerrainManager |
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 terrain inside the renderer.
|
explicit |
Creates a new RendererTerrain.
| scene | A reference to the owning scene. |
|
finalnoexcept |
Destroys the renderer terrain and releases any renderer (and RenderAPI)-related resources.
| void CeresEngine::RendererTerrain::draw | ( | GPUCommandBuffer & | commandBuffer | ) |
|
inlinenoexcept |
A set of flags that represent the dirty portions of the object.
|
inlinenoexcept |
|
inlinenoexcept |
A set of flags that customize and represent the state of the object.
|
inline |
A structure that holds renderer-specific information for the terrain.
|
inline |
A structure that holds renderer-specific information for the terrain.
|
inlinenoexcept |
|
inline |
The uniform buffer storing the terrain GPU parameters used by the renderer.
|
inlinenoexcept |
If set to true, the terrain is dirty and needs to be synchronized from the entity.
|
noexcept |
If set to true, the terrain is dirty and needs to be synchronized from the entity.
| void CeresEngine::RendererTerrain::prepare | ( | RendererContext & | context | ) |
Prepares the terrain 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. |
| void CeresEngine::RendererTerrain::setFlags | ( | const RendererTerrainFlags & | flags | ) |
A set of flags that customize and represent the state of the object.
| void CeresEngine::RendererTerrain::synchronize | ( | const Transform & | transform, |
| const TerrainRenderableComponent & | component | ||
| ) |
Update the renderer terrain with data from a transform and the component.
RenderingSystem during a synchronization point.| transform | The terrain transform. |
| component | The terrain component. |
|
friend |
|
private |
A copy of the latest terrain component.
If set to true, the terrain 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 terrain.
|
private |
|
private |
The GPU parameters. Will be copied to the GPU uniform buffer.
|
private |
The uniform buffer storing the terrain GPU parameters used by the renderer.