Carna Version 3.3.3
Loading...
Searching...
No Matches
RenderStage.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2015 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 */
11
12#ifndef RENDERSTAGE_H_6014714286
13#define RENDERSTAGE_H_6014714286
14
15#include <Carna/Carna.h>
17#include <Carna/base/math.h>
18
23namespace Carna
24{
25
26namespace base
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// RenderStage
33// ----------------------------------------------------------------------------------
34
42class CARNA_LIB RenderStage
43{
44
46
47 struct Details;
48 const std::unique_ptr< Details > pimpl;
49
50public:
51
56
60 virtual ~RenderStage();
61
69 virtual RenderStage* clone() const = 0;
70
79
85
97 virtual void reshape( FrameRenderer& fr, unsigned int width, unsigned int height );
98
107 bool isInitialized() const;
108
112 virtual void prepareFrame( Node& root );
113
126 virtual void renderPass( const math::Matrix4f& viewTransform, RenderTask& rt, const Viewport& vp ) = 0;
127
132 bool isEnabled() const;
133
138 void setEnabled( bool );
139
145
149
155
161
162}; // RenderStage
163
164
165
166} // namespace Carna :: base
167
168} // namespace Carna
169
170#endif // RENDERSTAGE_H_6014714286
Represents an association.
Definition Association.h:45
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.h:45
Defines callbacks for RenderStage lifetime events.
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Definition RenderStage.h:43
virtual ~RenderStage()
Deletes.
bool isViewTransformFixed() const
Tells 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 dimensions.
virtual void prepareFrame(Node &root)
Called once before each frame.
void setEnabled(bool)
Sets whether this stage is enabled. Disabled stages are not rendered by render tasks.
const base::FrameRenderer & renderer() const
bool isEnabled() const
Tells whether this stage is enabled. Disabled stages are not rendered by render tasks.
void setViewTransformFixed(bool viewTransformFixed)
Sets whether the view transform is pass-invariant for the duration of a single frame.
RenderStage()
Instantiates in enabled-state.
virtual RenderStage * clone() const =0
Returns same RenderStage implementation with same configuration.
bool isInitialized() const
Tells whether this stage is ready for rendering.
base::FrameRenderer & renderer()
References the renderer this stage belongs to.
virtual void renderPass(const math::Matrix4f &viewTransform, RenderTask &rt, const Viewport &vp)=0
Called once per pass.
void removeRenderStageListener(RenderStageListener &listener)
Removes listener from the set of listeners this instance notifies in .
void addRenderStageListener(RenderStageListener &listener)
Adds listener to the set of listeners this instance notifies in .
Invokes the rendering stages of the frame renderer successively.
Definition RenderTask.h:41
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.h:49
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193
#define NON_COPYABLE
Features class it is placed in as non-copyable.