12#ifndef VOLUMERENDERINGSTAGE_H_6014714286
13#define VOLUMERENDERINGSTAGE_H_6014714286
17#include <Carna/Carna.h>
320 const std::unique_ptr< Details > pimpl;
322 struct VideoResources;
323 std::unique_ptr< VideoResources > vr;
330 const static unsigned int DEFAULT_SAMPLE_RATE = 200;
393 virtual const std::string&
uniformName(
unsigned int role )
const = 0;
Defines Carna::base::GeometryStage.
Defines Carna::base::Renderable.
Partially implements a rendering stage that uses at least one render queue for rendering geometry fro...
Invokes the rendering stages of the frame renderer successively.
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Defines abstract base class for rendering stages that render volume geometries in the scene.
virtual const base::ShaderProgram & acquireShader()=0
Acquires the shader from the base::ShaderManager, that is to be used for rendering the slices.
virtual ~VolumeRenderingStage()
Deletes.
void setSampleRate(unsigned int sampleRate)
Sets number of slices to be rendered per segment.
unsigned int sampleRate() const
Tells number of slices to be rendered per segment.
virtual void createVolumeSamplers(const std::function< void(unsigned int, base::Sampler *) > ®isterSampler)=0
Creates texture samplers for volume textures and uses registerSampler to assign them to the roles tha...
virtual void configureShader()=0
Performs custom shader configuration on a per-pass level.
virtual unsigned int loadVideoResources()
Loads video resources when rendering is triggered for the first time. Override this method if you nee...
virtual const std::string & uniformName(unsigned int role) const =0
Tells the name of the uniform variable, that the role texture is to be bound to. Use configureShader ...
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Triggers the volume rendering.
VolumeRenderingStage(unsigned int geometryType)
Instantiates. The created stage will render such base::Geometry scene graph nodes,...
virtual void render(const base::Renderable &) override
Renders the renderable.
virtual void configureShader(const base::Renderable &)=0
Performs custom shader configuration on a per-volume level.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.