Carna Version 3.3.3
Loading...
Searching...
No Matches
RenderTask.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 RENDERTASK_H_6014714286
13#define RENDERTASK_H_6014714286
14
15#include <Carna/Carna.h>
16#include <Carna/base/math.h>
17
22namespace Carna
23{
24
25namespace base
26{
27
28
29
30// ----------------------------------------------------------------------------------
31// RenderTask
32// ----------------------------------------------------------------------------------
33
40class CARNA_LIB RenderTask
41{
42
43 Framebuffer* myOutput;
44
45 std::size_t nextRenderStage;
46
47 math::Matrix4f myViewTransform;
48
49public:
50
54 RenderTask( const FrameRenderer& renderer, const math::Matrix4f& projection, const math::Matrix4f& viewTransform );
55
58 RenderTask( const FrameRenderer& renderer, const math::Matrix4f& projection, const math::Matrix4f& viewTransform, Framebuffer& output );
59
64
68 explicit RenderTask( const RenderTask& parent );
69
74
79
84
89
94 void render( const Viewport& vp, unsigned int clearBuffersMask = 0 );
95
99 void finish();
100
101protected:
102
106 virtual void renderStage( RenderStage& rs, const Viewport& viewport );
107
108}; // RenderTask
109
110
111
112} // namespace Carna :: base
113
114} // namespace Carna
115
116#endif // RENDERTASK_H_6014714286
Represents an association.
Definition Association.h:45
Defines logic for rendering frames from given scenes.
Maintains a framebuffer object that supports up to 8 color components simultaneously.
Definition Framebuffer.h:50
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
const math::Matrix4f & projection
References the projection matrix to be used.
Definition RenderTask.h:78
void overrideViewTransform(const math::Matrix4f &)
Overrides the view matrix to be used for further rendering.
void finish()
Finishes this task prematurely.
virtual void renderStage(RenderStage &rs, const Viewport &viewport)
Renders rs with viewport through RenderStage::renderPass.
RenderTask(const RenderTask &parent, Framebuffer &output)
Forks parent. The result of the fork will be rendered to output.
void render(const Viewport &vp, unsigned int clearBuffersMask=0)
Invokes renderStage an all associated render stages remained. Disabled stages are skipped.
RenderTask(const RenderTask &parent)
Forks parent.
RenderTask(const FrameRenderer &renderer, const math::Matrix4f &projection, const math::Matrix4f &viewTransform)
Instantiates. For internal usage only.
RenderTask(const FrameRenderer &renderer, const math::Matrix4f &projection, const math::Matrix4f &viewTransform, Framebuffer &output)
const math::Matrix4f & viewTransform() const
References the view matrix to be used.
const FrameRenderer & renderer
References the frame renderer.
Definition RenderTask.h:73
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