LibCarna Version 3.4.0
Loading...
Searching...
No Matches
RenderStage.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef RENDERSTAGE_H_6014714286
16#define RENDERSTAGE_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
21
27namespace LibCarna
28{
29
30namespace base
31{
32
33
34
35// ----------------------------------------------------------------------------------
36// RenderStage
37// ----------------------------------------------------------------------------------
38
45class LIBCARNA RenderStage
46{
47
49
50 struct Details;
51 const std::unique_ptr< Details > pimpl;
52
53public:
54
59
63 virtual ~RenderStage();
64
73
79
90 virtual void reshape( FrameRenderer& fr, unsigned int width, unsigned int height );
91
99 bool isInitialized() const;
100
104 virtual void prepareFrame( Node& root );
105
115 virtual void renderPass( const math::Matrix4f& viewTransform, RenderTask& rt, const Viewport& vp ) = 0;
116
120 bool isEnabled() const;
121
125 void setEnabled( bool );
126
133
137
142
147
148}; // RenderStage
149
150
151
152} // namespace LibCarna :: base
153
154} // namespace LibCarna
155
156#endif // RENDERSTAGE_H_6014714286
Contains forward-declarations.
Represents an association.
Defines logic for rendering frames from given scenes.
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition Node.hpp:48
Defines callbacks for RenderStage lifetime events.
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
RenderStage()
Instantiates in enabled-state.
void setEnabled(bool)
Sets whether this stage is enabled. Disabled stages are not rendered by render tasks.
bool isInitialized() const
Tells whether this stage is ready for rendering.
virtual ~RenderStage()
Deletes.
bool isViewTransformFixed() const
Tells whether the view transform is pass-invariant for the duration of a single frame.
base::FrameRenderer & renderer()
References the renderer this stage belongs to.
void removeRenderStageListener(RenderStageListener &listener)
Removes listener from the set of listeners this instance notifies in .
virtual void renderPass(const math::Matrix4f &viewTransform, RenderTask &rt, const Viewport &vp)=0
Called once per pass.
virtual void prepareFrame(Node &root)
Called once before each frame.
const base::FrameRenderer & renderer() const
void setViewTransformFixed(bool viewTransformFixed)
Sets whether the view transform is pass-invariant for the duration of a single frame.
virtual void reshape(FrameRenderer &fr, unsigned int width, unsigned int height)
Orders this stage to reshape its buffers according to the specified width and height.
bool isEnabled() const
Tells whether this stage is enabled. Disabled stages are not rendered by render tasks.
void addRenderStageListener(RenderStageListener &listener)
Adds listener to the set of listeners this instance notifies in .
Invokes the rendering stages of the frame renderer successively.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Defines LibCarna::base::math namespace and LIBCARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.