Kanzi  3.9.9
Kanzi Engine C++ API
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. More...
 
bool isDirty () const
 Returns whether the container is dirty. More...
 
void setDirty (bool enabled)
 Sets the dirty flag state. More...
 
void update (GlRenderState &renderState, PropertyObject *object, Material &material)
 Update render state with new values acquirable from this. More...
 
- Public Member Functions inherited from kanzi::NodePropertyNotificationHandler
NodegetNode () const
 Access the node. More...
 
void invalidate ()
 Invalidates the state of the notification handler. More...
 
bool isValid () const
 Tell if this notification handler is valid. More...
 
- Public Member Functions inherited from kanzi::AbstractPropertyNotificationHandler
AbstractPropertyType getPropertyType () const
 Get the property type this handler is listening. More...
 

Protected Member Functions

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

Protected Attributes

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

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

kanzi::RenderStatePropertyNotificationHandler::RenderStatePropertyNotificationHandler ( )
explicitprotecteddefault

Empty constructor.

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.
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

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*.
int kanzi::RenderStatePropertyNotificationHandler::getHandle ( ) const
inline

Access handle.

Returns
Handle.
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
void kanzi::RenderStatePropertyNotificationHandler::setDirty ( bool  enabled)
inline

Sets the dirty flag state.

Parameters
enabledThe state of the dirty flag.
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.
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::TypedRenderStateRangePropertyNotificationHandler< T >, kanzi::BlendModeRenderStatePropertyNotificationHandler, and kanzi::TypedRenderStatePropertyNotificationHandler< T >.

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

Member Data Documentation

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

Handle into the render state.

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

Shader transformation.

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: