LibCarna Version 3.4.0
Loading...
Searching...
No Matches
CompositionStage.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 COMPOSITIONSTAGE_H_6014714286
16#define COMPOSITIONSTAGE_H_6014714286
17
19
25namespace LibCarna
26{
27
28namespace presets
29{
30
31
32
33// ----------------------------------------------------------------------------------
34// CompositionStage
35// ----------------------------------------------------------------------------------
36
44class LIBCARNA CompositionStage : public base::RenderStage
45{
46
47 struct Details;
48 const std::unique_ptr< Details > pimpl;
49
50public:
51
56 {
61
65 aside
66 };
67
72
77
83 void setCompositionMode( CompositionMode compositionMode );
84
91
97 void setCompositionSwap( bool );
98
105
106 virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
107
108 virtual void prepareFrame( base::Node& root ) override;
109
115 virtual void renderPass
116 ( const base::math::Matrix4f& viewTransform
117 , base::RenderTask& rt
118 , const base::Viewport& vp ) override;
119
120protected:
121
141 virtual void renderPass
142 ( const base::math::Matrix4f& viewTransform
143 , base::RenderTask& rt
144 , const base::Viewport& vp
145 , bool isFirstInvocation
146 , bool isFirstSource ) = 0;
147
148}; // CompositionStage
149
150
151
152} // namespace LibCarna :: presets
153
154} // namespace LibCarna
155
156#endif // COMPOSITIONSTAGE_H_6014714286
Defines LibCarna::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.hpp:48
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
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 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 width and height.
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&,...
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.
void setCompositionSwap(bool)
Swaps the two renderings obtained through renderPass(const base::math::Matrix4f&,base::RenderTask&,...
CompositionMode
Defines how two renderings are to be combined.
bool isCompositionSwapped() const
Tells whether the two renderings obtained through renderPass(const base::math::Matrix4f&,...
CompositionMode compositionMode() const
Tells how the two renderings obtained through renderPass(const base::math::Matrix4f&,...
CompositionStage(CompositionMode compositionMode)
Instantiates.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197