Carna Version 3.3.3
Loading...
Searching...
No Matches
CompositionStage.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 COMPOSITIONSTAGE_H_6014714286
13#define COMPOSITIONSTAGE_H_6014714286
14
16
21namespace Carna
22{
23
24namespace presets
25{
26
27
28
29// ----------------------------------------------------------------------------------
30// CompositionStage
31// ----------------------------------------------------------------------------------
32
41class CARNA_LIB CompositionStage : public base::RenderStage
42{
43
44 struct Details;
45 const std::unique_ptr< Details > pimpl;
46
47public:
48
53 {
58
62 aside
63 };
64
69
74
80 void setCompositionMode( CompositionMode compositionMode );
81
88
94 void setCompositionSwap( bool );
95
102
103 virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
104
105 virtual void prepareFrame( base::Node& root ) override;
106
112 virtual void renderPass
113 ( const base::math::Matrix4f& viewTransform
114 , base::RenderTask& rt
115 , const base::Viewport& vp ) override;
116
117protected:
118
138 virtual void renderPass
139 ( const base::math::Matrix4f& viewTransform
140 , base::RenderTask& rt
141 , const base::Viewport& vp
142 , bool isFirstInvocation
143 , bool isFirstSource ) = 0;
144
145}; // CompositionStage
146
147
148
149} // namespace Carna :: presets
150
151} // namespace Carna
152
153#endif // COMPOSITIONSTAGE_H_6014714286
Defines Carna::base::RenderStage.
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
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Definition RenderStage.h:43
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 rendering stage that combines two other renderings either by putting them next to each other ...
virtual void reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) override
Orders this stage to reshape its buffers according to the specified dimensions.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Invokes renderPass(const base::math::Matrix4f&,base::RenderTask&,const base::Viewport&,...
CompositionMode
Defines how two renderings are to be combined.
virtual ~CompositionStage()
Deletes.
void setCompositionSwap(bool)
Swaps the two renderings obtained through renderPass(const base::math::Matrix4f&,base::RenderTask&,...
bool isCompositionSwapped() const
Tells whether the two renderings obtained through renderPass(const base::math::Matrix4f&,...
CompositionStage(CompositionMode compositionMode)
Instantiates.
virtual void prepareFrame(base::Node &root) override
Called once before each frame.
void setCompositionMode(CompositionMode compositionMode)
Sets how the two renderings obtained through renderPass(const base::math::Matrix4f&,...
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp, bool isFirstInvocation, bool isFirstSource)=0
Renders one of the two renderings that are to be combined per invocation.
CompositionMode compositionMode() const
Tells how the two renderings obtained through renderPass(const base::math::Matrix4f&,...
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193