Kanzi  3.9.6
Kanzi Engine API
kanzi::TextureBrushRenderer Class Reference

Texture brush renderer class. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/texture_brush_renderer.hpp>

Inheritance diagram for kanzi::TextureBrushRenderer:
[legend]

Public Member Functions

ColorRGBA getModulateColorValue () const
 Gets the last used render modulate color value. More...
 
TextureSharedPtr getRenderTextureValue () const
 Gets the last used render texture value. More...
 
- Public Member Functions inherited from kanzi::ContentBrushRenderer
TextureSharedPtr getContentTextureValue () const
 Gets the last used content texture value. More...
 
MaterialSharedPtr getMaterial () override
 Get currently set material for the renderer. More...
 
float getRenderOpacityValue () const
 Gets the last used render opacity value. More...
 
- Public Member Functions inherited from kanzi::GlBrushRenderer
MaterialSharedPtr acquireErrorMaterial ()
 Acquire error material for rendering. More...
 
 GlBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
 ~GlBrushRenderer () override
 Destructor. More...
 
- Public Member Functions inherited from kanzi::BrushRenderer
void bind (Renderer3D &renderer)
 Bind brush renderer for rendering. More...
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix4x4 &transform)
 Draw a brush using given quad. More...
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix3x3 &transform)
 Overload for draw a brush using given quad. More...
 
int getBlendModeValue ()
 Gets the last used blend mode value. More...
 
BrushgetBrush () const
 Access brush. More...
 
TextureSharedPtr getContentTexture () const
 Access content texture. More...
 
NodegetNode () const
 Gets the attached node. More...
 
unsigned int getPropertyChangeCounter () const
 Access property change counter. More...
 
RenderMode getRenderMode () const
 Get currently selected render mode. More...
 
float getRenderOpacity () const
 Access opacity. More...
 
bool hasRenderMode () const
 Indicates whether a valid render mode is selected. More...
 
void restoreResources ()
 Restore resources after sleep. More...
 
void setContentTexture (TextureSharedPtr texture)
 Set a content texture. More...
 
void setRenderOpacity (float opacity)
 Set opacity to use for next attach. More...
 
void updateRender (optional< int > blendMode, bool translucencyHint)
 Called from Node2D::updateRender(). More...
 
virtual ~BrushRenderer ()=default
 Destructor. More...
 

Static Public Member Functions

static BrushRendererPtr create (Brush *brush, Node *node)
 Create a new texture brush renderer. More...
 
- Static Public Member Functions inherited from kanzi::ContentBrushRenderer
static BrushRendererPtr create (Brush *brush, Node *node)
 Create a new content brush renderer. More...
 

Protected Member Functions

void bindOverride (Renderer3D &renderer) override
 BrushRenderer::bindOverride() implementation. More...
 
void drawOverride (Renderer &renderer, const Geometry &quad, const Matrix4x4 &transform) override
 BrushRenderer::drawOverride() implementation. More...
 
void restoreResourcesOverride () override
 BrushRenderer::restoreResourcesOverride() implementation. More...
 
 TextureBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
void updateRenderOverride (optional< int > blendMode, bool translucencyHint) override
 BrushRenderer::updateRenderOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::ContentBrushRenderer
 ContentBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
int getBlendModeValueOverride () override
 BrushRenderer::getBlendModeValueOverride() implementation. More...
 
int getContentBrushBlendMode () const
 Gets the blend mode as specified in the content brush. More...
 
void recreateRenderValues ()
 Recreate all render value structures from current material. More...
 
void setBlendModeFallback (bool isOpaque)
 Sets the fallback blend mode. More...
 
void setBlendModeOverride (optional< int > blendMode)
 Sets the override blend mode. More...
 
- Protected Member Functions inherited from kanzi::BrushRenderer
 BrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
bool isChangeCounterSame () const
 Checks whether the property change counter matches that of the brush. More...
 
virtual void setContentTextureOverride (TextureSharedPtr texture)
 BrushRenderer-specific update of the content texture. More...
 
void setRenderMode (RenderMode selection)
 Set render mode. More...
 
void updateChangeCounter ()
 Updates property change counter to match the counter value from brush. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::BrushRenderer
enum  RenderMode { RenderModeNone, RenderModeContent, RenderModeNoContent }
 Enum signifying currently selected render mode. More...
 
- Protected Attributes inherited from kanzi::ContentBrushRenderer
int m_blendModeFallback
 Blend mode fallback. More...
 
optional< int > m_blendModeOverride
 Blend mode override. More...
 
BlendModeValuePropertyNotificationHandler m_blendModeProperty
 Property listener for blend mode. More...
 
GlBlendModeRenderValue m_blendModeValue
 Render value. More...
 
GlRenderValue< TextureSharedPtrm_contentTextureValue
 Render value. More...
 
MaterialSharedPtr m_material
 Currently selected material. More...
 
GlRenderValue< float > m_renderOpacityValue
 Render value. More...
 
- Protected Attributes inherited from kanzi::BrushRenderer
Brushm_brush
 Brush attached to. More...
 
unsigned int m_brushPropertyChangeCounter
 Property change counter to track brush. More...
 
TextureSharedPtr m_contentTexture
 Content texture provided to the brush renderer from outside, e.g. from Node2D. More...
 
Nodem_node
 Node attached to. More...
 
RenderMode m_renderMode
 Currently used render mode (or none if not selected). More...
 
float m_renderOpacity
 Opacity to issue on attach. More...
 

Detailed Description

Texture brush renderer class.

Since
Kanzi 3.9.1 changed to use KANZI_COREUI_API and base class type changed from GlBrushRenderer to ContentBrushRenderer.

Constructor & Destructor Documentation

◆ TextureBrushRenderer()

kanzi::TextureBrushRenderer::TextureBrushRenderer ( Brush brush,
Node node 
)
inlineexplicitprotected

Constructor.

Parameters
brushBrush to use.
nodeNode to attach to.

Member Function Documentation

◆ create()

static BrushRendererPtr kanzi::TextureBrushRenderer::create ( Brush brush,
Node node 
)
static

Create a new texture brush renderer.

Parameters
brushBrush to use.
nodeNode to attach to.

◆ getModulateColorValue()

ColorRGBA kanzi::TextureBrushRenderer::getModulateColorValue ( ) const
inline

Gets the last used render modulate color value.

Returns
Color.

◆ getRenderTextureValue()

TextureSharedPtr kanzi::TextureBrushRenderer::getRenderTextureValue ( ) const
inline

Gets the last used render texture value.

Returns
Shared pointer to texture.

◆ bindOverride()

void kanzi::TextureBrushRenderer::bindOverride ( Renderer3D renderer)
overrideprotectedvirtual

BrushRenderer::bindOverride() implementation.

Reimplemented from kanzi::ContentBrushRenderer.

◆ drawOverride()

void kanzi::TextureBrushRenderer::drawOverride ( Renderer renderer,
const Geometry quad,
const Matrix4x4 transform 
)
overrideprotectedvirtual

BrushRenderer::drawOverride() implementation.

Reimplemented from kanzi::ContentBrushRenderer.

◆ restoreResourcesOverride()

void kanzi::TextureBrushRenderer::restoreResourcesOverride ( )
overrideprotectedvirtual

◆ updateRenderOverride()

void kanzi::TextureBrushRenderer::updateRenderOverride ( optional< int >  blendMode,
bool  translucencyHint 
)
overrideprotectedvirtual

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