Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::MaterialBrushRenderer Class Reference

Material brush renderer. More...

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

Inheritance diagram for kanzi::MaterialBrushRenderer:
[legend]

Static Public Member Functions

static BrushRendererPtr create (Brush *brush, Node *node)
 Create a new shader brush renderer. More...
 

Protected Member Functions

void drawOverride (Renderer &renderer, const Geometry &quad, const Matrix4x4 &transform) override
 BrushRenderer::drawOverride() implementation. More...
 
bool isChangeCounterSame () override
 BrushRenderer::isChangeCounterSame() implementation. More...
 
 MaterialBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
void updateChangeCounter () override
 BrushRenderer::updateChangeCounter() implementation. More...
 
void updateRenderOverride () override
 BrushRenderer::updateRenderOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::BrushRenderer
virtual bool bindOverride (Renderer3D &renderer, PropertyObject *object)
 BrushRenderer-specific bind implementation. More...
 
 BrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
virtual void restoreResourcesOverride ()
 BrushRenderer-specific restore resources implementation. More...
 
virtual void setContentTextureOverride (TextureSharedPtr texture)
 BrushRenderer-specific update of the content texture. More...
 
void setRenderMode (RenderMode selection)
 Sets the render mode. More...
 

Protected Attributes

size_t m_materialPropertyChangeCounter
 Property change counter to track material. 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. For example, from Node2D. More...
 
GlRenderState::HandleType m_contentTextureHandle
 Render value handle. More...
 
bool m_isRenderable
 Indicates whether the last bind() call was successful and the brush can be rendered. More...
 
Nodem_node
 Node attached to. More...
 
RenderMode m_renderMode
 Currently used render mode (or none if not selected). More...
 
float m_renderOpacity
 Render opacity provided to the brush renderer from outside. For example, from Node2D. More...
 
GlRenderState::HandleType m_renderOpacityHandle
 Render value handle. More...
 
GlRenderState m_renderState
 Contained render state. More...
 
GlRenderValueBinding m_renderValueBinding
 Property binding handler. More...
 

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. More...
 
void attachMaterial (MaterialSharedPtr material)
 Attaches a custom material. More...
 
void bind (Renderer3D &renderer, PropertyObject *object)
 Binds a brush renderer for rendering. More...
 
void bind (Renderer3D &renderer)
 Binds a brush renderer for rendering. More...
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix4x4 &transform)
 Draws a brush using a given quad. More...
 
void draw (Renderer &renderer, const Geometry &quad, const Matrix3x3 &transform)
 Overload for drawing a brush using a given quad. More...
 
optional< int > getBlendModeOverride () const
 Gets the blend mode override value. More...
 
int getBlendModeValue () const
 Gets the last used blend mode value. More...
 
BrushgetBrush () const
 Gets the brush for which Kanzi created this brush renderer. More...
 
TextureSharedPtr getContentTexture () const
 Gets the content texture used by the brush renderer. More...
 
MaterialSharedPtr getMaterial () const
 Gets the currently set material for the renderer. More...
 
NodegetNode () const
 Gets the attached node. More...
 
bool getOpaquenessHint () const
 Gets the opaqueness hint value. More...
 
unsigned int getPropertyChangeCounter () const
 Gets the brush property change counter. More...
 
RenderMode getRenderMode () const
 Gets the currently selected render mode. More...
 
float getRenderOpacity () const
 Gets the render opacity. More...
 
GlRenderStategetRenderState ()
 Gets the internal render state. More...
 
void invalidateRenderValues ()
 Invalidates all render values. More...
 
bool isOpaque () const
 Indicates whether the rendered brush is opaque. More...
 
bool isRenderable () const
 Indicates whether a brush is in a renderable state. More...
 
void restoreResources ()
 Restores resources after sleep. More...
 
void setBlendModeOverride (optional< int > blendMode)
 Sets the blend mode override value. More...
 
void setContentTexture (TextureSharedPtr texture)
 Sets the content texture for the brush renderer. More...
 
void setOpaquenessHint (bool value)
 Sets the opaqueness hint. More...
 
void setRenderOpacity (float opacity)
 Sets the render opacity to use for the next attach. More...
 
void updateRender ()
 Prepares a brush for rendering. More...
 
virtual ~BrushRenderer ()=default
 Destructor. More...
 

Detailed Description

Material brush renderer.

Since
Kanzi 3.9.1 changed to use KANZI_COREUI_API.
Kanzi 3.9.7 changed the base class from GlBrushRenderer to BrushRenderer.

Constructor & Destructor Documentation

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

Constructor.

Parameters
brushBrush to use.
nodeNode to attach to.

Member Function Documentation

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

Create a new shader brush renderer.

Parameters
brushBrush to use.
nodeNode to attach to.
void kanzi::MaterialBrushRenderer::drawOverride ( Renderer renderer,
const Geometry quad,
const Matrix4x4 transform 
)
overrideprotectedvirtual
void kanzi::MaterialBrushRenderer::updateRenderOverride ( )
overrideprotectedvirtual
bool kanzi::MaterialBrushRenderer::isChangeCounterSame ( )
overrideprotectedvirtual

BrushRenderer::isChangeCounterSame() implementation.

Reimplemented from kanzi::BrushRenderer.

void kanzi::MaterialBrushRenderer::updateChangeCounter ( )
overrideprotectedvirtual

BrushRenderer::updateChangeCounter() implementation.

Reimplemented from kanzi::BrushRenderer.

Member Data Documentation

size_t kanzi::MaterialBrushRenderer::m_materialPropertyChangeCounter
protected

Property change counter to track material.


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