GlRenderValueBinding is a binding from shaders/materials into values in GlRenderState.
More...
#include <kanzi/core.ui/platform/graphics_backend/gl/gl_render_value_binding.hpp>
|
void | addPropertyListener (Node *node, GlRenderState &renderState, PropertyDataType dataType, AbstractPropertyType propertyType, ShaderProgram::UniformTransformation transformation) |
| Add a listener for given property. More...
|
|
void | applyBlendMode (GlRenderState &renderState, PropertyObject *object, Material &material) |
| Applies the blend mode. More...
|
|
void | attach (Material &material, Node *node, bool readBlendModeFromNode, GlRenderState &renderState) |
| Attaches to a material and a node. More...
|
|
void | attach (Material &material, Node *node, GlRenderState &renderState) |
| Attaches to a material and a node. More...
|
|
optional< int > | getBlendModeValue (PropertyObject *object, Material &material) |
| Gets the blend mode value to apply. More...
|
|
void | invalidate () |
| Invalidates the state of the notification handler. More...
|
|
void | setAllPropertiesDirty () |
| Flag all properties as being dirty and needing an update. More...
|
|
void | setBlendModeFallback (optional< int > blendMode) |
| Sets the fallback blend mode. More...
|
|
void | setBlendModeOverride (optional< int > blendMode) |
| Sets the blend mode override. More...
|
|
void | update (GlRenderState &renderState, PropertyObject *object, Material &material) |
| Apply changes into render state. More...
|
|
GlRenderValueBinding is a binding from shaders/materials into values in GlRenderState.
- Since
- Kanzi 3.9.7 removed applyBlendMode(). Use getBlendModeValue() instead.
Add a listener for given property.
- Parameters
-
node | Node on which to listen for property changes. |
renderState | Render state to update when the property changes. |
dataType | Data type of the render value. |
propertyType | Property type to listen. |
transformation | Shader transformation for uniform values. |
- Since
- Kanzi 3.9.7 added
dataType
.
void kanzi::GlRenderValueBinding::attach |
( |
Material & |
material, |
|
|
Node * |
node, |
|
|
bool |
readBlendModeFromNode, |
|
|
GlRenderState & |
renderState |
|
) |
| |
Attaches to a material and a node.
When used with 2D nodes, the blend mode control is not necessarily attached to the node. This is the case when the blend mode is determined manually.
- Parameters
-
material | Material to use. |
node | Node to listen property changes on or nullptr. |
readBlendModeFromNode | If you want to read the blend mode from the node, set to true. |
renderState | The render state to update on changes. |
- Since
- Kanzi 3.9.1
Attaches to a material and a node.
Reading the blend mode from the node is enabled.
- Parameters
-
material | Material to use. |
node | Node to listen property changes on or nullptr. |
renderState | The render state to update on changes. |
Apply changes into render state.
- Parameters
-
renderState | Render state to write changes to. |
object | Fallback property object for property value. |
material | Fallback material for property value. |
- Since
- Kanzi 3.9.1 data type of
object
parameter changed from Object* to PropertyObject*.
void kanzi::GlRenderValueBinding::invalidate |
( |
| ) |
|
Invalidates the state of the notification handler.
Use this function to invalidate a node that you destroyed before destroying the GlRenderValueBinding.
void kanzi::GlRenderValueBinding::setAllPropertiesDirty |
( |
| ) |
|
Flag all properties as being dirty and needing an update.
Gets the blend mode value to apply.
Kanzi uses this function internally by calling it in applyBlendMode(). You can use this function in tests.
- Parameters
-
object | Object to use for acquiring the property. |
material | Current material. |
- Since
- Kanzi 3.9.7
Applies the blend mode.
- Parameters
-
renderState | The render state to which to write. |
object | Object to use for acquiring the property. |
material | Current material. |
- Since
- Kanzi 3.9.1
void kanzi::GlRenderValueBinding::setBlendModeOverride |
( |
optional< int > |
blendMode | ) |
|
|
inline |
Sets the blend mode override.
Call this function only when a material is already attached.
- Parameters
-
blendMode | Blend mode override or nullopt to disable. |
- Since
- Kanzi 3.9.1
void kanzi::GlRenderValueBinding::setBlendModeFallback |
( |
optional< int > |
blendMode | ) |
|
|
inline |
Sets the fallback blend mode.
Call this function only when a material is already attached.
- Parameters
-
blendMode | Blend mode fallback or nullopt to disable. |
- Since
- Kanzi 3.9.1
The documentation for this struct was generated from the following file: