Kanzi 3.9.10
kanzi::RenderStatePropertyNotificationHandler Class Referenceabstract

Render value updater for render state. More...

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

Inheritance diagram for kanzi::RenderStatePropertyNotificationHandler:
[legend]

Public Member Functions

int getHandle () const
 Access handle.
 
bool isDirty () const
 Returns whether the container is dirty.
 
void setDirty (bool enabled)
 Sets the dirty flag state.
 
void update (GlRenderState &renderState, PropertyObject *object, Material &material)
 Update render state with new values acquirable from this.
 
- Public Member Functions inherited from kanzi::NodePropertyNotificationHandler
NodegetNode () const
 Access the node.
 
void invalidate ()
 Invalidates the state of the notification handler.
 
bool isValid () const
 Tell if this notification handler is valid.
 
- Public Member Functions inherited from kanzi::AbstractPropertyNotificationHandler
AbstractPropertyType getPropertyType () const
 Get the property type this handler is listening.
 

Protected Member Functions

ShaderProgram::UniformTransformation getTransformation () const
 Gets the uniform transformation.
 
void onPropertyChanged (PropertyNotificationReason) override
 AbstractPropertyNotificationHandler::onPropertyChanged() implementation.
 
 RenderStatePropertyNotificationHandler ()=default
 Empty constructor.
 
 RenderStatePropertyNotificationHandler (AbstractPropertyType propertyType, Node *node)
 Constructor Has no handle.
 
 RenderStatePropertyNotificationHandler (AbstractPropertyType propertyType, Node *node, GlRenderState::HandleType handle, ShaderProgram::UniformTransformation transformation)
 Constructor.
 
virtual void updateOverride (GlRenderState &renderState, PropertyObject *object, Material &material)=0
 Perform type-specific update.
 
- Protected Member Functions inherited from kanzi::NodePropertyNotificationHandler
 NodePropertyNotificationHandler ()
 Empty constructor.
 
 NodePropertyNotificationHandler (AbstractPropertyType propertyType, Node *node)
 Constructor.
 
 NodePropertyNotificationHandler (const NodePropertyNotificationHandler &rhs)
 Copy constructor.
 
NodePropertyNotificationHandleroperator= (const NodePropertyNotificationHandler &rhs)
 Assignment operator.
 
 ~NodePropertyNotificationHandler () override
 Destructor.
 
- Protected Member Functions inherited from kanzi::AbstractPropertyNotificationHandler
 AbstractPropertyNotificationHandler ()
 Empty constructor.
 
 AbstractPropertyNotificationHandler (AbstractPropertyType propertyType)
 Constructor.
 
virtual ~AbstractPropertyNotificationHandler ()
 

Protected Attributes

bool m_dirty
 Indicates whether this property is dirty and needs updating.
 
GlRenderState::HandleType m_handle
 Handle into the render state.
 
ShaderProgram::UniformTransformation m_transformation
 Shader transformation.
 

Detailed Description

Render value updater for render state.

This is an abstract class that is inherited and specialized by property value type.

Constructor & Destructor Documentation

◆ RenderStatePropertyNotificationHandler() [1/3]

kanzi::RenderStatePropertyNotificationHandler::RenderStatePropertyNotificationHandler ( )
explicitprotecteddefault

Empty constructor.

◆ RenderStatePropertyNotificationHandler() [2/3]

kanzi::RenderStatePropertyNotificationHandler::RenderStatePropertyNotificationHandler ( AbstractPropertyType propertyType,
Node * node )
inlineexplicitprotected

Constructor Has no handle.

Should only used for blend mode.

Parameters
propertyTypeProperty type to listen on.
nodeNode to listen for changes on.

◆ RenderStatePropertyNotificationHandler() [3/3]

kanzi::RenderStatePropertyNotificationHandler::RenderStatePropertyNotificationHandler ( AbstractPropertyType propertyType,
Node * node,
GlRenderState::HandleType handle,
ShaderProgram::UniformTransformation transformation )
inlineexplicitprotected

Constructor.

Parameters
propertyTypeProperty type to listen on.
nodeNode to listen for changes on.
handleHandle into the render state.
transformationUniform transformation.

Member Function Documentation

◆ update()

void kanzi::RenderStatePropertyNotificationHandler::update ( GlRenderState & renderState,
PropertyObject * object,
Material & material )

Update render state with new values acquirable from this.

Do not update if dirty flag has not been set (property is not marked as dirty).

Parameters
renderStateRender state to update.
objectFallback object for property value. Can be 0.
materialFallback material for property value.
Since
Kanzi 3.9.1 data type of object parameter changed from Object* to PropertyObject*.

◆ getHandle()

int kanzi::RenderStatePropertyNotificationHandler::getHandle ( ) const
inline

Access handle.

Returns
Handle.

◆ isDirty()

bool kanzi::RenderStatePropertyNotificationHandler::isDirty ( ) const
inline

Returns whether the container is dirty.

Returns
If the container is dirty, true, otherwise false.
Since
Kanzi 3.9.7

◆ setDirty()

void kanzi::RenderStatePropertyNotificationHandler::setDirty ( bool enabled)
inline

Sets the dirty flag state.

Parameters
enabledThe state of the dirty flag.

◆ getTransformation()

ShaderProgram::UniformTransformation kanzi::RenderStatePropertyNotificationHandler::getTransformation ( ) const
inlineprotected

Gets the uniform transformation.

Returns
Uniform transformation for the render value.
Since
Kanzi 3.9.7 moved from RenderValuePropertyNotificationHandlerBase.

◆ updateOverride()

virtual void kanzi::RenderStatePropertyNotificationHandler::updateOverride ( GlRenderState & renderState,
PropertyObject * object,
Material & material )
protectedpure virtual

Perform type-specific update.

Parameters
renderStateRender state to update.
objectFallback object for property value, may be 0 for no object.
materialFallback material for property value.
Since
Kanzi 3.9.1 data type of object parameter changed from Object* to PropertyObject*.

Implemented in kanzi::TypedRenderStatePropertyNotificationHandler< T >, kanzi::BlendModeRenderStatePropertyNotificationHandler, and kanzi::TypedRenderStateRangePropertyNotificationHandler< T >.

◆ onPropertyChanged()

void kanzi::RenderStatePropertyNotificationHandler::onPropertyChanged ( PropertyNotificationReason )
overrideprotectedvirtual

Member Data Documentation

◆ m_handle

GlRenderState::HandleType kanzi::RenderStatePropertyNotificationHandler::m_handle
protected

Handle into the render state.

◆ m_transformation

ShaderProgram::UniformTransformation kanzi::RenderStatePropertyNotificationHandler::m_transformation
protected

Shader transformation.

◆ m_dirty

bool kanzi::RenderStatePropertyNotificationHandler::m_dirty
protected

Indicates whether this property is dirty and needs updating.


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