Kanzi 3.9.10
kanzi::CompositionBrushRenderer Class Reference

OpenGL texture brush renderer class. More...

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

Inheritance diagram for kanzi::CompositionBrushRenderer:
[legend]

Static Public Member Functions

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

Protected Member Functions

 CompositionBrushRenderer (Brush *brush, Node *node)
 Constructor.
 
- Protected Member Functions inherited from kanzi::ContentBrushRenderer
bool bindOverride (Renderer3D &renderer, PropertyObject *object) override
 BrushRenderer::bindOverride() implementation.
 
 ContentBrushRenderer (Brush *brush, Node *node)
 Constructor.
 
void drawOverride (Renderer &renderer, const Geometry &geometry, const Matrix4x4 &transform) override
 BrushRenderer::drawOverride() implementation.
 
void updateRenderOverride () override
 BrushRenderer::updateRenderOverride() implementation.
 
- Protected Member Functions inherited from kanzi::BrushRenderer
 BrushRenderer (Brush *brush, Node *node)
 Constructor.
 
virtual bool isChangeCounterSame ()
 Checks whether the property change counter matches that of the brush.
 
virtual void restoreResourcesOverride ()
 BrushRenderer-specific restore resources implementation.
 
virtual void setContentTextureOverride (TextureSharedPtr texture)
 BrushRenderer-specific update of the content texture.
 
void setRenderMode (RenderMode selection)
 Sets the render mode.
 
virtual void updateChangeCounter ()
 Updates the property change counter to match the counter value from the brush.
 

Additional Inherited Members

- Public Types inherited from kanzi::BrushRenderer
enum  RenderMode { RenderModeNone , RenderModeContent , RenderModeNoContent }
 Enum signifying currently selected render mode. More...
 
- Public Member Functions inherited from kanzi::BrushRenderer
MaterialSharedPtr acquireErrorMaterial ()
 Acquires an error material for rendering.
 
void attachMaterial (MaterialSharedPtr material)
 Attaches a custom material.
 
void bind (Renderer3D &renderer)
 Binds a brush renderer for rendering.
 
void bind (Renderer3D &renderer, PropertyObject *object)
 Binds a brush renderer for rendering.
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix3x3 &transform)
 Overload for drawing a brush using a given quad.
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix4x4 &transform)
 Draws a brush using a given quad.
 
optional< intgetBlendModeOverride () const
 Gets the blend mode override value.
 
int getBlendModeValue () const
 Gets the last used blend mode value.
 
BrushgetBrush () const
 Gets the brush for which Kanzi created this brush renderer.
 
TextureSharedPtr getContentTexture () const
 Gets the content texture used by the brush renderer.
 
MaterialSharedPtr getMaterial () const
 Gets the currently set material for the renderer.
 
NodegetNode () const
 Gets the attached node.
 
bool getOpaquenessHint () const
 Gets the opaqueness hint value.
 
unsigned int getPropertyChangeCounter () const
 Gets the brush property change counter.
 
RenderMode getRenderMode () const
 Gets the currently selected render mode.
 
float getRenderOpacity () const
 Gets the render opacity.
 
GlRenderStategetRenderState ()
 Gets the internal render state.
 
void invalidateRenderValues ()
 Invalidates all render values.
 
bool isOpaque () const
 Indicates whether the rendered brush is opaque.
 
bool isRenderable () const
 Indicates whether a brush is in a renderable state.
 
void restoreResources ()
 Restores resources after sleep.
 
void setBlendModeOverride (optional< int > blendMode)
 Sets the blend mode override value.
 
void setContentTexture (TextureSharedPtr texture)
 Sets the content texture for the brush renderer.
 
void setOpaquenessHint (bool value)
 Sets the opaqueness hint.
 
void setRenderOpacity (float opacity)
 Sets the render opacity to use for the next attach.
 
void updateRender ()
 Prepares a brush for rendering.
 
virtual ~BrushRenderer ()=default
 Destructor.
 
- Protected Attributes inherited from kanzi::BrushRenderer
Brushm_brush
 Brush attached to.
 
unsigned int m_brushPropertyChangeCounter
 Property change counter to track brush.
 
TextureSharedPtr m_contentTexture
 Content texture provided to the brush renderer from outside. For example, from Node2D.
 
GlRenderState::HandleType m_contentTextureHandle
 Render value handle.
 
bool m_isRenderable
 Indicates whether the last bind() call was successful and the brush can be rendered.
 
Nodem_node
 Node attached to.
 
RenderMode m_renderMode
 Currently used render mode (or none if not selected).
 
float m_renderOpacity
 Render opacity provided to the brush renderer from outside. For example, from Node2D.
 
GlRenderState::HandleType m_renderOpacityHandle
 Render value handle.
 
GlRenderState m_renderState
 Contained render state.
 
GlRenderValueBinding m_renderValueBinding
 Property binding handler.
 

Detailed Description

OpenGL texture brush renderer class.

Constructor & Destructor Documentation

◆ CompositionBrushRenderer()

kanzi::CompositionBrushRenderer::CompositionBrushRenderer ( Brush * brush,
Node * node )
inlineexplicitprotected

Constructor.

Parameters
brushBrush to use.
nodeNode to attach to.

Member Function Documentation

◆ create()

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

Create a new composition brush renderer.

Parameters
brushBrush to use.
nodeNode to attach to.

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