15#ifndef VOLUMERENDERINGSTAGE_H_6014714286
16#define VOLUMERENDERINGSTAGE_H_6014714286
324 const std::unique_ptr< Details > pimpl;
326 struct VideoResources;
327 std::unique_ptr< VideoResources > vr;
334 const static unsigned int DEFAULT_SAMPLE_RATE = 200;
397 virtual const std::string&
uniformName(
unsigned int role )
const = 0;
Defines LibCarna::base::GeometryStage.
Contains forward-declarations.
Defines LibCarna::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 ~VolumeRenderingStage()
Deletes.
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.
unsigned int sampleRate() const
Tells number of slices to be rendered per segment.
void setSampleRate(unsigned int sampleRate)
Sets number of slices to be rendered per segment.
VolumeRenderingStage(unsigned int geometryType)
Instantiates. The created stage will render such base::Geometry scene graph nodes,...
virtual void configureShader(const base::Renderable &)=0
Performs custom shader configuration on a per-volume level.
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.
virtual void render(const base::Renderable &) override
Renders the renderable.
virtual unsigned int loadVideoResources()
Loads video resources when rendering is triggered for the first time. Override this method if you nee...
virtual const base::ShaderProgram & acquireShader()=0
Acquires the shader from the base::ShaderManager, that is to be used for rendering the slices.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.