Kanzi 3.9.10
kanzi::EffectStackRenderer2D Class Reference

Use the Effect Stack Renderer to render a sequence of child effect renderers. More...

#include <kanzi/core.ui/effect/effect_stack_renderer2d.hpp>

Inheritance diagram for kanzi::EffectStackRenderer2D:
[legend]

Public Types

using RenderParametersEntry
 

Public Member Functions

void addChild (NodeEffectRenderer2DSharedPtr childRenderer)
 Adds a child renderer to the end of the child list.
 
NodeEffectRenderer2DSharedPtr getChild (unsigned int index) const
 Gets the child renderer at a given index.
 
unsigned int getChildCount () const
 Gets the number of child renderers.
 
void insertChild (unsigned int index, NodeEffectRenderer2DSharedPtr childRenderer)
 Inserts a child renderer at a given index.
 
void removeChild (unsigned int index)
 Removes the child renderer at a given index.
 
void setIsLayered (unsigned int index, bool isLayered)
 Sets whether the child renderer at the specified index is layered.
 
void setRenderingRequired (unsigned int index, bool requiresRendering)
 Sets whether the child renderer at the specified index requires rendering.
 
- Public Member Functions inherited from kanzi::NodeEffectRenderer2D
void applyEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const Matrix3x3 &worldTransform, const CompositionContentRequirements &requirements, TextureSharedPtr sourceContent)
 Applies the effect on the source content provided as texture.
 
void beginEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const Matrix3x3 &worldTransform, const CompositionContentRequirements &requirements)
 Begins the effect.
 
void blitEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const QuadDescription &effectQuad, const Matrix3x3 &transform, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix, int blendMode, bool needsClear)
 Blits the effect to the current framebuffer.
 
void endEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager)
 Ends the effect.
 
NodeEffect2DSharedPtr getEffect () const
 Get NodeEffect2D instance where this renderer has been instantiated from.
 
size_t getEffectPassCount () const
 Gets the number of effect passes.
 
bool isLayeredOnTop () const
 Whether a compatible effect renders logically on top of its source content.
 
bool isRenderEffectOnlyEnabled () const
 Whether the effect only mode is enabled.
 
void restoreResources ()
 Restores resources after the rendering context has been lost.
 
void setRenderEffectOnly (bool renderEffectOnly)
 Sets the render effect only mode.
 
virtual ~NodeEffectRenderer2D ()
 Declare NodeEffectRenderer2D as not movable nor copyable.
 

Static Public Member Functions

static EffectStackRenderer2DUniquePtr create (EffectStack2DSharedPtr effectStack)
 Creates an instance of EffectStackRenderer2D.
 

Additional Inherited Members

- Protected Types inherited from kanzi::NodeEffectRenderer2D
using EffectPassContainer
 Container for effect passes.
 
- Protected Member Functions inherited from kanzi::NodeEffectRenderer2D
EffectPassaddEffectPass ()
 Adds an effect pass and gets a reference to that pass.
 
void beginInitialEffectPass (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const CompositionContentRequirements &requirements)
 Begins the initial effect pass (effect pass at index 0).
 
void blitEffectPass (int effectPassIndex, Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const QuadDescription &effectQuad, const Matrix3x3 &transform, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix, int blendMode, bool needsClear)
 Blits the effect pass and handles the perspective transform if necessary.
 
void blitFinalEffectPass (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const QuadDescription &effectQuad, const Matrix3x3 &transform, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix, int blendMode, bool needsClear)
 Blits the final effect pass, whose index is getEffectPassCount() - 1, and handles the perspective transform if necessary.
 
void blitIntermediateEffectPass (int effectPassIndex, Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager)
 Blits the intermediate effect pass.
 
void clearRenderTarget (Renderer3D &renderer, CompositionStack &compositionStack, NativeFramebufferHandle framebufferHandle, ColorRGBA clearColor)
 Clears the native framebuffer with a given color.
 
void clearRenderTarget (Renderer3D &renderer, CompositionStack &compositionStack, TextureSharedPtr texture, ColorRGBA clearColor)
 Clears the render target texture with a given color.
 
void configureInitialEffectPass (Vector2 sourceContentSize)
 Configures the initial effect pass.
 
void endInitialEffectPass (CompositionStack &compositionStack)
 Ends the initial effect pass, whose index is 0.
 
void finalizeEffectPasses ()
 Finalizes the effect passes.
 
Vector2 getEffectInputTexelSize (int effectPassIndex, int inputIndex)
 Gets the texel size of the input effect pass texture in texture coordinates.
 
EffectPassgetEffectPass (int index)
 Gets a reference to the effect pass at a given index.
 
int getLastEffectPassIndex () const
 Gets the index of the last effect pass.
 
bool isInitialPassRenderTargetTemporary () const
 Whether the initial pass render target is temporary.
 
 NodeEffectRenderer2D (NodeEffect2DSharedPtr nodeEffect)
 Constructor.
 
virtual void onRenderEffectOnlyChanged ()
 Kanzi calls this when the render effect only mode changes.
 
void releaseEffectPassInputRenderTargets (EffectPass &currentEffectPass, CompositionManager *compositionManager)
 Releases those temporary render targets used by input that have EffectPass::Input::releaseRenderTarget set to true.
 
void removeAllEffectPasses ()
 Removes all user-added effect passes, but leaves the internal initial effect pass.
 
void setLayeredOnTop (bool layeredOnTop)
 Sets whether the effect is layered on top of the source content.
 
- Static Protected Attributes inherited from kanzi::NodeEffectRenderer2D
static constexpr int InitialEffectPassIndex
 Effect pass index for the initial pass.
 

Detailed Description

Use the Effect Stack Renderer to render a sequence of child effect renderers.

Kanzi renders the child effect renderers in the order that you add them to the effect stack renderer.

See also
EffectStack2D, NodeEffect2D, NodeEffectPrefab2D, NodeEffectTemplate2D
Since
Kanzi 3.9.8

Member Typedef Documentation

◆ RenderParametersEntry

Member Function Documentation

◆ create()

static EffectStackRenderer2DUniquePtr kanzi::EffectStackRenderer2D::create ( EffectStack2DSharedPtr effectStack)
static

Creates an instance of EffectStackRenderer2D.

Parameters
effectStackThe EffectStack2D instance on which this renderer is based.
Returns
EffectStackRenderer2D instance.

◆ addChild()

void kanzi::EffectStackRenderer2D::addChild ( NodeEffectRenderer2DSharedPtr childRenderer)
inline

Adds a child renderer to the end of the child list.

Parameters
childRendererA non-null child renderer.

◆ insertChild()

void kanzi::EffectStackRenderer2D::insertChild ( unsigned int index,
NodeEffectRenderer2DSharedPtr childRenderer )

Inserts a child renderer at a given index.

Parameters
indexIndex at which to insert the child renderer.
childRendererThe child renderer to insert.

◆ removeChild()

void kanzi::EffectStackRenderer2D::removeChild ( unsigned int index)

Removes the child renderer at a given index.

Parameters
indexThe index of the child renderer to remove.

◆ getChild()

NodeEffectRenderer2DSharedPtr kanzi::EffectStackRenderer2D::getChild ( unsigned int index) const

Gets the child renderer at a given index.

Parameters
indexIndex at which to retrieve the child renderer.
Returns
The child renderer at the given index.

◆ getChildCount()

unsigned int kanzi::EffectStackRenderer2D::getChildCount ( ) const

Gets the number of child renderers.

◆ setRenderingRequired()

void kanzi::EffectStackRenderer2D::setRenderingRequired ( unsigned int index,
bool requiresRendering )

Sets whether the child renderer at the specified index requires rendering.

Parameters
indexThe index of the child renderer.
requiresRenderingIf the child renderer requires rendering e\ true, otherwise false.

◆ setIsLayered()

void kanzi::EffectStackRenderer2D::setIsLayered ( unsigned int index,
bool isLayered )

Sets whether the child renderer at the specified index is layered.

Parameters
indexThe index of the child renderer.
isLayeredIf the child renderer is layered e\ true, otherwise false.

The documentation for this class was generated from the following file: