CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
RendererView.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Forward.hpp"
11
14
16
17namespace CeresEngine {
18
19 class RenderGraph;
21
40
47 private:
50
54
55 public:
58
61 virtual ~RendererView();
62
63 public:
69 virtual void prepare(RendererContext& context);
70
71 protected:
73 virtual void createRenderGraph();
74
75 public:
78
79 public:
81 [[nodiscard]] virtual RendererScene& getScene() const = 0;
82
84 [[nodiscard]] virtual const RendererCameraSettings& getSettings() const = 0;
85
87 [[nodiscard]] virtual const RendererViewInfo& getViewInfo() const = 0;
88
91
93 [[nodiscard]] virtual const GPUBindlessBuffer& getUniformBuffer() const = 0;
94
96 [[nodiscard]] virtual const GPUImagePtr& getRenderImage() const = 0;
97
100 [[nodiscard]] virtual const ConvexVolume& getFrustumVolume() const = 0;
101 };
102
108
121 public:
124
128
129 public:
134 };
135
136} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
A GPU bindless buffer.
Definition GPUBufferObject.hpp:516
Definition RenderGraph.hpp:23
A class that represents a scene inside the renderer.
Definition RendererScene.hpp:34
A view group is a similar concept to a view, except it contains multiple views.
Definition RendererView.hpp:120
virtual Vector< RendererView * > getViews() const
Returns a vector of all views in the view group.
virtual ~RendererViewGroup()
Destroys the RendererViewGroup and releases any renderer (and RenderAPI)-related resources.
RendererViewGroup()
Creates a new RendererViewGroup.
A class that represents a view inside the renderer.
Definition RendererView.hpp:46
virtual void prepare(RendererContext &context)
Prepares the view for the rendering of the current frame.
virtual const GPUImagePtr & getRenderImage() 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.
virtual const GPUBindlessBuffer & getUniformBuffer() const =0
The uniform buffer storing the view GPU parameters used by the renderer.
virtual RendererScene & getScene() const =0
A reference to the scene to be rendered by the view.
virtual void createRenderGraph()
Creates a new RenderGraph instance for the view.
RenderGraph * getRenderGraph() const noexcept
The render graph instance used to render the view.
Definition RendererView.hpp:77
virtual ~RendererView()
Destroys the RendererView and releases any renderer (and RenderAPI)-related resources.
RendererView()
Creates a new RendererView.
UPtr< RenderGraph > mRenderGraph
The render graph instance used to render the view.
Definition RendererView.hpp:49
size_t mSettingsHash
The hash of the settings struct.
Definition RendererView.hpp:53
virtual RendererViewInfo & getViewInfo()=0
A structure that holds renderer-specific information for the view.
virtual const RendererCameraSettings & getSettings() const =0
virtual const RendererViewInfo & getViewInfo() const =0
A structure that holds renderer-specific information for the view.
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
@ Transform
Indicates that the object transform is dirty.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that holds renderer-specific settings for a Camera.
Definition RendererCameraSettings.hpp:274
A structure that contains context given by the renderer to render it's objects.
Definition Renderer.hpp:252
A structure that holds renderer-specific information for the view group.
Definition RendererView.hpp:104
Transform transform
A transform object that represents the transform of the view group.
Definition RendererView.hpp:106
A structure that holds renderer-specific information for the view.
Definition RendererView.hpp:23
Matrix4 view
Transformation matrices for the view view and it's inverse.
Definition RendererView.hpp:28
Matrix4 projection
Transformation matrices for the view projection and it's inverse.
Definition RendererView.hpp:31
Matrix4 invView
Definition RendererView.hpp:28
ConvexVolume frustumVolume
The convex volume for the camera frustum.
Definition RendererView.hpp:38
Matrix4 invViewProjection
Definition RendererView.hpp:34
Matrix4 viewProjection
Transformation matrices for the view view-projection and it's inverse.
Definition RendererView.hpp:34
Matrix4 invProjection
Definition RendererView.hpp:31
Transform transform
A transform object that represents the transform of the view.
Definition RendererView.hpp:25