CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererView Class Referenceabstract

A class that represents a view inside the renderer. More...

#include <CeresEngine/Renderer/RendererView.hpp>

Inheritance diagram for CeresEngine::RendererView:
CeresEngine::RendererCamera

Public Member Functions

 RendererView ()
 Creates a new RendererView.
 
virtual ~RendererView ()
 Destroys the RendererView and releases any renderer (and RenderAPI)-related resources.
 
virtual void prepare (RendererContext &context)
 Prepares the view for the rendering of the current frame.
 
RenderGraphgetRenderGraph () const noexcept
 The render graph instance used to render the view.
 
virtual RendererScenegetScene () const =0
 A reference to the scene to be rendered by the view.
 
virtual const RendererCameraSettingsgetSettings () const =0
 
virtual const RendererViewInfogetViewInfo () const =0
 A structure that holds renderer-specific information for the view.
 
virtual RendererViewInfogetViewInfo ()=0
 A structure that holds renderer-specific information for the view.
 
virtual const GPUBindlessBuffergetUniformBuffer () const =0
 The uniform buffer storing the view GPU parameters used by the renderer.
 
virtual const GPUImagePtrgetRenderImage () const =0
 The render target that the view should render to.
 
virtual const ConvexVolume & getFrustumVolume () const =0
 Returns the latest view frustum volume, used to perform frustum culling.
 

Protected Member Functions

virtual void createRenderGraph ()
 Creates a new RenderGraph instance for the view.
 

Private Attributes

UPtr< RenderGraphmRenderGraph
 The render graph instance used to render the view.
 
size_t mSettingsHash
 The hash of the settings struct.
 

Detailed Description

A class that represents a view inside the renderer.

A view is similar to a camera but it's more general. Cameras provide a view, but views can also be provided by reflection probes to render the scene around them or by other entities that needs to have spacial information about their surroundings in the scene.

Constructor & Destructor Documentation

◆ RendererView()

CeresEngine::RendererView::RendererView ( )

Creates a new RendererView.

◆ ~RendererView()

virtual CeresEngine::RendererView::~RendererView ( )
virtual

Destroys the RendererView and releases any renderer (and RenderAPI)-related resources.

Member Function Documentation

◆ createRenderGraph()

virtual void CeresEngine::RendererView::createRenderGraph ( )
protectedvirtual

Creates a new RenderGraph instance for the view.

◆ getFrustumVolume()

virtual const ConvexVolume & CeresEngine::RendererView::getFrustumVolume ( ) const
pure virtual

Returns the latest view frustum volume, used to perform frustum culling.

Implemented in CeresEngine::RendererCamera.

◆ getRenderGraph()

RenderGraph * CeresEngine::RendererView::getRenderGraph ( ) const
inlinenoexcept

The render graph instance used to render the view.

◆ getRenderImage()

virtual const GPUImagePtr & CeresEngine::RendererView::getRenderImage ( ) const
pure virtual

The render target that the view should render to.

Implemented in CeresEngine::RendererCamera.

◆ getScene()

virtual RendererScene & CeresEngine::RendererView::getScene ( ) const
pure virtual

A reference to the scene to be rendered by the view.

Implemented in CeresEngine::RendererCamera.

◆ getSettings()

virtual const RendererCameraSettings & CeresEngine::RendererView::getSettings ( ) const
pure virtual

Implemented in CeresEngine::RendererCamera.

◆ getUniformBuffer()

virtual const GPUBindlessBuffer & CeresEngine::RendererView::getUniformBuffer ( ) const
pure virtual

The uniform buffer storing the view GPU parameters used by the renderer.

Implemented in CeresEngine::RendererCamera.

◆ getViewInfo() [1/2]

virtual const RendererViewInfo & CeresEngine::RendererView::getViewInfo ( ) const
pure virtual

A structure that holds renderer-specific information for the view.

Implemented in CeresEngine::RendererCamera.

◆ getViewInfo() [2/2]

virtual RendererViewInfo & CeresEngine::RendererView::getViewInfo ( )
pure virtual

A structure that holds renderer-specific information for the view.

Implemented in CeresEngine::RendererCamera.

◆ prepare()

virtual void CeresEngine::RendererView::prepare ( RendererContext context)
virtual

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

Reimplemented in CeresEngine::RendererCamera.

Member Data Documentation

◆ mRenderGraph

UPtr<RenderGraph> CeresEngine::RendererView::mRenderGraph
private

The render graph instance used to render the view.

◆ mSettingsHash

size_t CeresEngine::RendererView::mSettingsHash
private

The hash of the settings struct.

Used to detect changes in the render graph.


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