![]() |
LibCarna Version 3.4.0
|
Base abstract class of each rendering stage. Refer to the documentation of the rendering process. More...
#include <RenderStage.hpp>
Public Member Functions | |
RenderStage () | |
Instantiates in enabled-state. | |
virtual | ~RenderStage () |
Deletes. | |
void | setViewTransformFixed (bool viewTransformFixed) |
Sets whether the view transform is pass-invariant for the duration of a single frame. | |
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 width and height. | |
bool | isInitialized () const |
Tells whether this stage is ready for rendering. | |
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. | |
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. | |
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 45 of file RenderStage.hpp.
bool LibCarna::base::RenderStage::isInitialized | ( | ) | const |
Called once before each frame.
Reimplemented in LibCarna::presets::CompositionStage, LibCarna::presets::OccludedRenderingStage, LibCarna::base::GeometryStage< RenderableCompare >, LibCarna::base::GeometryStage< base::Renderable::BackToFront >, and LibCarna::base::GeometryStage< void >.
base::FrameRenderer & LibCarna::base::RenderStage::renderer | ( | ) |
References the renderer this stage belongs to.
isInitialized() == true
const base::FrameRenderer & LibCarna::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 LibCarna::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 LibCarna::presets::CompositionStage, LibCarna::presets::CuttingPlanesStage, LibCarna::presets::DRRStage, LibCarna::presets::DVRStage, LibCarna::presets::MaskRenderingStage, LibCarna::presets::MeshColorCodingStage, LibCarna::presets::MIPStage, LibCarna::presets::OccludedRenderingStage, LibCarna::presets::TransparentRenderingStage, LibCarna::presets::VolumeRenderingStage, LibCarna::base::GeometryStage< RenderableCompare >, LibCarna::base::GeometryStage< base::Renderable::BackToFront >, LibCarna::base::GeometryStage< void >, LibCarna::base::MeshRenderingStage< RenderableCompare >, and LibCarna::base::MeshRenderingStage< base::Renderable::BackToFront >.
|
virtual |
Orders this stage to reshape its buffers according to the specified width and height.
fr | references the frame renderer this stage belongs to. |
width | is the root viewport width. |
height | is the root viewport height. |
Reimplemented in LibCarna::presets::CompositionStage, LibCarna::presets::DRRStage, LibCarna::presets::DVRStage, LibCarna::presets::MaskRenderingStage, LibCarna::presets::MeshColorCodingStage, LibCarna::presets::MIPStage, and LibCarna::presets::OccludedRenderingStage.
Sets whether the view transform is pass-invariant for the duration of a single frame.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen