Carna
Version 3.3.2
|
Base abstract class of each rendering stage. Refer to the documentation of the rendering process. More...
#include <RenderStage.h>
Public Member Functions | |
RenderStage () | |
Instantiates in enabled-state. | |
virtual | ~RenderStage () |
Deletes. | |
virtual RenderStage * | clone () const =0 |
Returns same RenderStage implementation with same configuration. More... | |
void | setViewTransformFixed (bool viewTransformFixed) |
Sets whether the view transform is pass-invariant for the duration of a single frame. More... | |
bool | isViewTransformFixed () const |
Tells whether the view transform is pass-invariant for the duration of a single frame. | |
virtual void | reshape (FrameRenderer &fr, unsigned int width, unsigned int height) |
Orders this stage to reshape its buffers according to the specified dimensions. More... | |
bool | isInitialized () const |
Tells whether this stage is ready for rendering. More... | |
virtual void | prepareFrame (Node &root) |
Called once before each frame. | |
virtual void | renderPass (const math::Matrix4f &viewTransform, RenderTask &rt, const Viewport &vp)=0 |
Called once per pass. More... | |
bool | isEnabled () const |
Tells whether this stage is enabled. Disabled stages are not rendered by render tasks. | |
void | setEnabled (bool) |
Sets whether this stage is enabled. Disabled stages are not rendered by render tasks. | |
base::FrameRenderer & | renderer () |
References the renderer this stage belongs to. More... | |
const base::FrameRenderer & | renderer () const |
void | addRenderStageListener (RenderStageListener &listener) |
Adds listener to the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\). | |
void | removeRenderStageListener (RenderStageListener &listener) |
Removes listener from the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\). | |
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Definition at line 42 of file RenderStage.h.
|
pure virtual |
Returns same RenderStage
implementation with same configuration.
The listeners and the rendering state are not copied.
Implemented in Carna::presets::DVRStage, Carna::presets::DRRStage, Carna::base::MeshRenderingStage< RenderableCompare >, Carna::base::MeshRenderingStage< base::Renderable::BackToFront >, Carna::presets::MaskRenderingStage, Carna::presets::MIPStage, Carna::presets::CuttingPlanesStage, Carna::presets::MeshColorCodingStage, Carna::presets::ParallaxStage, Carna::presets::OccludedRenderingStage, and Carna::presets::TransparentRenderingStage.
bool Carna::base::RenderStage::isInitialized | ( | ) | const |
base::FrameRenderer& Carna::base::RenderStage::renderer | ( | ) |
References the renderer this stage belongs to.
isInitialized() == true
const base::FrameRenderer& Carna::base::RenderStage::renderer | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
pure virtual |
Called once per pass.
If this rendering stage maintains one or more Carna::base::RenderQueue objects, than this is the right place to build them. Note that the queues need to be rebuilt only once per frame and not per pass, unless isViewTransformFixed is false
. If it is true
and this is not the first invocation of this method since the last time prepareFrame was called, rewinding the queue will be sufficient.
Implemented in Carna::presets::VolumeRenderingStage, Carna::presets::DVRStage, Carna::presets::DRRStage, Carna::presets::MeshColorCodingStage, Carna::base::MeshRenderingStage< RenderableCompare >, Carna::base::MeshRenderingStage< base::Renderable::BackToFront >, Carna::presets::OccludedRenderingStage, Carna::presets::CompositionStage, Carna::base::GeometryStage< RenderableCompare >, Carna::base::GeometryStage< base::Renderable::BackToFront >, Carna::base::GeometryStage< void >, Carna::presets::MaskRenderingStage, Carna::presets::MIPStage, Carna::presets::CuttingPlanesStage, and Carna::presets::TransparentRenderingStage.
|
virtual |
Orders this stage to reshape its buffers according to the specified dimensions.
fr | references the frame renderer this stage belongs to. |
width | is the root viewport width. |
height | is the root viewport height. |
Reimplemented in Carna::presets::DVRStage, Carna::presets::DRRStage, Carna::presets::MeshColorCodingStage, Carna::presets::OccludedRenderingStage, Carna::presets::CompositionStage, Carna::presets::MaskRenderingStage, and Carna::presets::MIPStage.
void Carna::base::RenderStage::setViewTransformFixed | ( | bool | viewTransformFixed | ) |
Sets whether the view transform is pass-invariant for the duration of a single frame.
Documentation generated by Doxygen