Render Pipeline provides a flexible way to execute rendering steps in the engine. More...
#include <pipeline.h>
Public Member Functions | |
RenderStep * | addStep (RenderStep *step) |
Add a step to the end of the pipeline. | |
template<typename T > | |
T * | own (std::unique_ptr< T > &&object) |
Capture ownership of a dynamically created. | |
template<typename T , typename... Args> | |
T * | createOwned (Args &&... args) |
Create a new object that will be managed by the pipeline. | |
template<typename T , typename... Args> | |
T * | addStep (Args &&... args) |
Create and add a step managed by the pipeline and return a pointer to the step for further configuration. | |
RenderSource * | getInput () |
RenderTarget * | getOutput () |
v2f | getScale () |
void | setScale (v2f value) |
virtual void | reset (PipelineContext &context) override |
virtual void | run (PipelineContext &context) override |
Runs the step. | |
virtual void | setRenderSource (RenderSource *source) override |
Assigns render source to this step. | |
virtual void | setRenderTarget (RenderTarget *target) override |
Assigned render target to this step. | |
Public Member Functions inherited from RenderPipelineObject | |
virtual | ~RenderPipelineObject ()=default |
Private Attributes | |
std::vector< RenderStep * > | m_pipeline |
std::vector< std::unique_ptr< RenderPipelineObject > > | m_objects |
DynamicSource | m_input |
DynamicTarget | m_output |
v2f | scale { 1.0f, 1.0f } |
Render Pipeline provides a flexible way to execute rendering steps in the engine.
RenderPipeline also implements
|
inline |
Create and add a step managed by the pipeline and return a pointer to the step for further configuration.
T | Type of the step to be added. |
Args | Types of the constructor parameters |
args | Constructor parameters |
References addStep(), and own().
|
inline |
Add a step to the end of the pipeline.
step | reference to a |
References m_pipeline.
Referenced by addPostProcessing(), addStep(), addUpscaling(), create3DStage(), createPipeline(), populateAnaglyphPipeline(), populateInterlacedPipeline(), populatePlainPipeline(), and populateSideBySidePipeline().
|
inline |
Create a new object that will be managed by the pipeline.
T | type of the object to be created |
Args | types of constructor arguments |
args | constructor arguments |
References own().
Referenced by addPostProcessing(), addUpscaling(), populateAnaglyphPipeline(), populateInterlacedPipeline(), populatePlainPipeline(), and populateSideBySidePipeline().
RenderSource * RenderPipeline::getInput | ( | ) |
References m_input.
RenderTarget * RenderPipeline::getOutput | ( | ) |
|
inline |
Capture ownership of a dynamically created.
RenderPipeline will delete the instance when the pipeline is destroyed.
step | reference to the instance. |
References m_objects.
Referenced by addStep(), create3DStage(), createOwned(), populateAnaglyphPipeline(), populateInterlacedPipeline(), populatePlainPipeline(), and populateSideBySidePipeline().
|
inlineoverridevirtual |
Reimplemented from RenderPipelineObject.
Referenced by RenderingCore::draw().
|
overridevirtual |
Runs the step.
This method is invoked by the pipeline.
Implements RenderStep.
References m_objects, m_pipeline, scale, and PipelineContext::target_size.
Referenced by RenderingCore::draw().
|
overridevirtual |
Assigns render source to this step.
source | source of rendering information |
Implements RenderStep.
References m_input, and DynamicSource::setRenderSource().
|
overridevirtual |
Assigned render target to this step.
target | render target to send output to. |
Implements RenderStep.
References m_output, and DynamicTarget::setRenderTarget().
|
private |
Referenced by getInput(), and setRenderSource().
|
private |
|
private |
Referenced by getOutput(), and setRenderTarget().
|
private |
|
private |
Referenced by getScale(), run(), and setScale().