kanzi::MaterialBrushRenderer Class Reference

Freeform shader brush renderer. More...

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

Inheritance diagram for kanzi::MaterialBrushRenderer:
kanzi::GlBrushRenderer kanzi::BrushRenderer

Public Member Functions

void bind (Renderer3D &renderer, Object *object)
 Bind material brush using a specific object as opposed to the brush. More...
 
virtual void bindOverride (Renderer3D &renderer) KZ_OVERRIDE
 BrushRenderer::bindOverride() implementation. More...
 
virtual void updateRenderOverride (bool forceOpaque, bool translucencyHint) KZ_OVERRIDE
 BrushRenderer::updateRenderOverride() implementation. More...
 
GlRenderStategetRenderState ()
 Access render state. More...
 
void invalidateRenderValues ()
 Invalidate all render values. More...
 
- Public Member Functions inherited from kanzi::GlBrushRenderer
 GlBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
virtual ~GlBrushRenderer ()
 Destructor. More...
 
MaterialSharedPtr acquireErrorMaterial ()
 Acquire error material for rendering. More...
 
- Public Member Functions inherited from kanzi::BrushRenderer
virtual ~BrushRenderer ()
 Destructor. More...
 
void updateRender (bool forceOpaque, bool translucencyHint)
 Called from Node2D::updateRender(), prepare brush for rendering. More...
 
void updateRender (bool forceOpaque)
 Default parameter override for updateRender(). More...
 
void updateRender ()
 Default parameter override for updateRender(). More...
 
void bind (Renderer3D &renderer)
 Bind brush renderer for rendering. More...
 
void draw (Renderer3D &renderer, const Geometry &quad, const Matrix4x4 &transform) const
 Draw a brush using given quad. More...
 
void draw (Renderer3D &renderer, const Geometry &quad, const Matrix3x3 &transform) const
 Overload for draw a brush using given quad. More...
 
void restoreResources ()
 Restore resources after sleep. More...
 
BrushgetBrush () const
 Access brush. More...
 
unsigned int getPropertyChangeCounter () const
 Access property change counter. More...
 
float getRenderOpacity () const
 Access opacity. More...
 
void setRenderOpacity (float opacity)
 Set opacity to use for next attach. More...
 
TextureSharedPtr getContentTexture () const
 Access content texture. More...
 
void setContentTexture (TextureSharedPtr texture)
 Set a content texture. More...
 
NodegetNode () const
 Access node. More...
 
RenderMode getRenderMode () const
 Get currently selected render mode. More...
 
bool hasRenderMode () const
 Tell if any (valid) render mode selection has been made. More...
 
bool hasOpaqueRenderMode () const
 Tell if selected render mode is opaque. More...
 

Static Public Member Functions

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

Protected Member Functions

 MaterialBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
virtual void drawOverride (Renderer3D &renderer, const Geometry &quad, const Matrix4x4 &transform) const KZ_OVERRIDE
 BrushRenderer::drawOverride() implementation. More...
 
virtual void restoreResourcesOverride () KZ_OVERRIDE
 BrushRenderer::restoreResourcesOverride() implementation. More...
 
bool isChangeCounterSame (Material &material) const
 Check if property change counter matches that of the brush. More...
 
void updateChangeCounter (Material &material)
 Update property change counter to match brush. More...
 
- Protected Member Functions inherited from kanzi::BrushRenderer
 BrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
void setRenderMode (RenderMode selection)
 Set render mode. More...
 
bool isChangeCounterSame () const
 Check if property change counter matches that of the brush. More...
 
void updateChangeCounter ()
 Update property change counter to match brush. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::BrushRenderer
enum  RenderMode {
  RenderModeNone, RenderModeInvalid, RenderModeOpaqueNoContent, RenderModeTranslucentNoContent,
  RenderModeOpaque, RenderModeTranslucent
}
 Enum signifying currently selected render mode. More...
 

Detailed Description

Freeform shader brush renderer.

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::bind ( Renderer3D renderer,
Object object 
)

Bind material brush using a specific object as opposed to the brush.

virtual void kanzi::MaterialBrushRenderer::bindOverride ( Renderer3D renderer)
inlinevirtual
virtual void kanzi::MaterialBrushRenderer::updateRenderOverride ( bool  forceOpaque,
bool  translucencyHint 
)
virtual
GlRenderState& kanzi::MaterialBrushRenderer::getRenderState ( )
inline

Access render state.

Returns
Reference to containded render state.
void kanzi::MaterialBrushRenderer::invalidateRenderValues ( )
inline

Invalidate all render values.

virtual void kanzi::MaterialBrushRenderer::drawOverride ( Renderer3D renderer,
const Geometry quad,
const Matrix4x4 transform 
) const
protectedvirtual
virtual void kanzi::MaterialBrushRenderer::restoreResourcesOverride ( )
protectedvirtual
bool kanzi::MaterialBrushRenderer::isChangeCounterSame ( Material material) const
inlineprotected

Check if property change counter matches that of the brush.

Parameters
materialMaterial currently used.
Returns
True if matches and no update is necessary, false otherwise.
void kanzi::MaterialBrushRenderer::updateChangeCounter ( Material material)
inlineprotected

Update property change counter to match brush.

Parameters
materialMaterial currently used.

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