LibCarna Version 3.4.0
Loading...
Searching...
No Matches
RenderTask.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 RENDERTASK_H_6014714286
16#define RENDERTASK_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20
26namespace LibCarna
27{
28
29namespace base
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// RenderTask
36// ----------------------------------------------------------------------------------
37
43class LIBCARNA RenderTask
44{
45
46 Framebuffer* myOutput;
47
48 std::size_t nextRenderStage;
49
50 math::Matrix4f myViewTransform;
51
52public:
53
57 RenderTask( const FrameRenderer& renderer, const math::Matrix4f& projection, const math::Matrix4f& viewTransform );
58
61 RenderTask( const FrameRenderer& renderer, const math::Matrix4f& projection, const math::Matrix4f& viewTransform, Framebuffer& output );
62
67
71 explicit RenderTask( const RenderTask& parent );
72
77
82
87
92
97 void render( const Viewport& vp, unsigned int clearBuffersMask = 0 );
98
102 void finish();
103
104protected:
105
109 virtual void renderStage( RenderStage& rs, const Viewport& viewport );
110
111}; // RenderTask
112
113
114
115} // namespace LibCarna :: base
116
117} // namespace LibCarna
118
119#endif // RENDERTASK_H_6014714286
Contains forward-declarations.
Represents an association.
Defines logic for rendering frames from given scenes.
Maintains a framebuffer object that supports up to 8 color components simultaneously.
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Invokes the rendering stages of the frame renderer successively.
virtual void renderStage(RenderStage &rs, const Viewport &viewport)
Renders rs with viewport through RenderStage::renderPass.
const math::Matrix4f & viewTransform() const
References the view matrix to be used.
const math::Matrix4f & projection
References the projection matrix to be used.
RenderTask(const FrameRenderer &renderer, const math::Matrix4f &projection, const math::Matrix4f &viewTransform, Framebuffer &output)
RenderTask(const RenderTask &parent)
Forks parent.
void overrideViewTransform(const math::Matrix4f &)
Overrides the view matrix to be used for further rendering.
const FrameRenderer & renderer
References the frame renderer.
RenderTask(const FrameRenderer &renderer, const math::Matrix4f &projection, const math::Matrix4f &viewTransform)
Instantiates. For internal usage only.
void render(const Viewport &vp, unsigned int clearBuffersMask=0)
Invokes renderStage an all associated render stages remained. Disabled stages are skipped.
void finish()
Finishes this task prematurely.
RenderTask(const RenderTask &parent, Framebuffer &output)
Forks parent. The result of the fork will be rendered to output.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Defines LibCarna::base::math namespace and LIBCARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197