Carna  Version 3.3.2
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 
15 #include <Carna/base/RenderStage.h>
16 
21 namespace Carna
22 {
23 
24 namespace presets
25 {
26 
27 
28 
29 // ----------------------------------------------------------------------------------
30 // CompositionStage
31 // ----------------------------------------------------------------------------------
32 
41 class CARNA_LIB CompositionStage : public base::RenderStage
42 {
43 
44  struct Details;
45  const std::unique_ptr< Details > pimpl;
46 
47 public:
48 
53  {
58 
62  aside
63  };
64 
68  CompositionStage( CompositionMode compositionMode );
69 
73  virtual ~CompositionStage();
74 
80  void setCompositionMode( CompositionMode compositionMode );
81 
87  CompositionMode compositionMode() const;
88 
94  void setCompositionSwap( bool );
95 
101  bool isCompositionSwapped() const;
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 
117 protected:
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 rendering stage that combines two other renderings either by putting them next to each other ...
CompositionMode
Defines how two renderings are to be combined.
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition: Node.h:44
Invokes the rendering stages of the frame renderer successively.
Definition: RenderTask.h:40
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition: math.h:193
Base abstract class of each rendering stage. Refer to the documentation of the rendering process...
Definition: RenderStage.h:42
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition: Viewport.h:48
Defines Carna::base::RenderStage.