Shadow effect renderer class. More...
#include <kanzi/core.ui/effect/shadow_effect_renderer2d.hpp>
Public Member Functions | |
void | setBlurRadius (float radius) |
Sets the pixel radius of the blur to use for the shadow. More... | |
void | setColor (ColorRGBA color) |
Sets the color of the shadow. More... | |
void | setQuality (ShadowEffect2D::Quality quality) |
Sets the quality of the shadow. More... | |
void | setShadowOffset (Vector2 offset) |
Sets the 2D offset in pixels for the blurred shadow. More... | |
void | setShadowOnly (bool shadowOnly) |
Sets the shadow-only mode. More... | |
void | setType (ShadowEffect2D::Type type) |
Sets the shadow type. More... | |
![]() | |
void | beginEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, const Matrix3x3 &worldTransform, Vector2 requiredSize, bool alphaRequired, bool depthRequired, bool stencilRequired) |
Begins the effect. More... | |
void | blitEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, QuadDescription &effectQuad, const Matrix3x3 &transform, const Matrix4x4 *perspectiveMatrix, const Matrix4x4 *projectionMatrix, int blendMode, bool needsClear) |
Blits the effect to the current framebuffer. More... | |
void | endEffect (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager) |
Ends the effect. More... | |
NodeEffect2DSharedPtr | getEffect () const |
Get NodeEffect2D instance where this renderer has been instantiated from. More... | |
size_t | getEffectPassCount () const |
Gets the number of effect passes. More... | |
void | restoreResources () |
Restores resources after the rendering context has been lost. More... | |
virtual | ~NodeEffectRenderer2D () |
Declare NodeEffectRenderer2D as not movable nor copyable. More... | |
Static Public Member Functions | |
static ShadowEffectRenderer2DUniquePtr | create (ShadowEffect2DSharedPtr shadowEffect) |
Creates instances of ShadowEffectRenderer2D. More... | |
Additional Inherited Members | |
![]() | |
using | EffectPassContainer = vector< EffectPass > |
Container for effect passes. More... | |
![]() | |
EffectPass & | addEffectPass () |
Adds an effect pass and gets a reference to that pass. More... | |
void | beginInitialEffectPass (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, bool alphaRequired, bool depthRequired, bool stencilRequired) |
Begins the initial effect pass (effect pass at index 0). More... | |
void | blitFinalEffectPass (Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager, 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. More... | |
void | blitIntermediateEffectPass (int effectPassIndex, Renderer3D &renderer, CompositionStack &compositionStack, CompositionManager *compositionManager) |
Blits the intermediate effect pass. More... | |
void | clearRenderTarget (Renderer3D &renderer, CompositionStack &compositionStack, TextureSharedPtr texture, ColorRGBA clearColor) |
Clears the render target texture with a given color. More... | |
void | clearRenderTarget (Renderer3D &renderer, CompositionStack &compositionStack, NativeFramebufferHandle framebufferHandle, ColorRGBA clearColor) |
Clears the native framebuffer with a given color. More... | |
void | endInitialEffectPass (CompositionStack &compositionStack) |
Ends the initial effect pass, whose index is 0. More... | |
void | finalizeEffectPasses () |
Finalizes the effect passes. More... | |
Vector2 | getEffectInputTexelSize (int effectPassIndex, int inputIndex) |
Gets the texel size of the input effect pass texture in texture coordinates. More... | |
EffectPass & | getEffectPass (int index) |
Gets a reference to the effect pass at a given index. More... | |
int | getLastEffectPassIndex () const |
Gets the index of the last effect pass. More... | |
NodeEffectRenderer2D (NodeEffect2DSharedPtr nodeEffect) | |
Constructor. More... | |
void | releaseEffectPassInputRenderTargets (NodeEffectRenderer2D::EffectPass ¤tEffectPass, CompositionManager *compositionManager) |
Releases those temporary render targets used by input that have EffectPass::Input::releaseRenderTarget set to true. More... | |
void | removeAllEffectPasses () |
Removes all effect passes. More... | |
Shadow effect renderer class.
|
static |
Creates instances of ShadowEffectRenderer2D.
shadowEffect | The ShadowEffect2D instance on which this renderer is based. |
void kanzi::ShadowEffectRenderer2D::setBlurRadius | ( | float | radius | ) |
Sets the pixel radius of the blur to use for the shadow.
radius | The blur radius in pixels. |
void kanzi::ShadowEffectRenderer2D::setShadowOffset | ( | Vector2 | offset | ) |
Sets the 2D offset in pixels for the blurred shadow.
offset | The shadow offset in pixels. |
void kanzi::ShadowEffectRenderer2D::setColor | ( | ColorRGBA | color | ) |
Sets the color of the shadow.
color | The shadow color. |
void kanzi::ShadowEffectRenderer2D::setQuality | ( | ShadowEffect2D::Quality | quality | ) |
Sets the quality of the shadow.
quality | The quality level. |
void kanzi::ShadowEffectRenderer2D::setType | ( | ShadowEffect2D::Type | type | ) |
Sets the shadow type.
type | The shadow type. |
void kanzi::ShadowEffectRenderer2D::setShadowOnly | ( | bool | shadowOnly | ) |
Sets the shadow-only mode.
shadowOnly | Whether to enable the shadow-only mode. |