aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickopenglshadereffectnode_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickopenglshadereffectnode_p.h')
-rw-r--r--src/quick/items/qquickopenglshadereffectnode_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquickopenglshadereffectnode_p.h b/src/quick/items/qquickopenglshadereffectnode_p.h
index adf5ef730b..5abe3ae3d0 100644
--- a/src/quick/items/qquickopenglshadereffectnode_p.h
+++ b/src/quick/items/qquickopenglshadereffectnode_p.h
@@ -90,9 +90,19 @@ public:
QByteArray name;
QVariant value;
+ int propertyIndex = -1;
SpecialType specialType;
bool operator == (const UniformData &other) const;
+
+ void setValueFromProperty(QObject *item, const QMetaObject *itemMetaObject)
+ {
+ if (propertyIndex == -1) {
+ value = item->property(name);
+ } else {
+ value = itemMetaObject->property(propertyIndex).read(item);
+ }
+ }
};
explicit QQuickOpenGLShaderEffectMaterial(QQuickOpenGLShaderEffectNode *node = 0);