diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2016-04-27 12:32:08 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-04-28 07:51:06 +0000 |
commit | 538926cdf076496b189fc942cbdd864dcab4dbab (patch) | |
tree | 561daf565c2b805ad143457f089bd3debfc9394b /src/render/materialsystem/shaderdata.cpp | |
parent | 70e76a457cb570e95ab8f96aad4634687a8f2a18 (diff) |
QShaderData also recognizes dynamic properties
Now those dynamic properties are copied as well and replicated on the
backend side.
Change-Id: Ia6b24c4fee2e412ad1b0f859b087d052c3510963
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/materialsystem/shaderdata.cpp')
-rw-r--r-- | src/render/materialsystem/shaderdata.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/materialsystem/shaderdata.cpp b/src/render/materialsystem/shaderdata.cpp index 7c53830ce..b23c3017a 100644 --- a/src/render/materialsystem/shaderdata.cpp +++ b/src/render/materialsystem/shaderdata.cpp @@ -293,6 +293,19 @@ void ShaderData::readPeerProperties(QShaderData *shaderData) } } + // Also check the dynamic properties + foreach (const QByteArray &propertyName , shaderData->dynamicPropertyNames()) { + if (propertyName == "data" || propertyName == "childNodes") // We don't handle default Node properties + continue; + + QVariant value = m_propertyReader->readProperty(shaderData->property(propertyName)); + QString key = QString::fromLatin1(propertyName); + + m_properties.insert(key, value); + m_originalProperties.insert(key, value); + } + + // We look for transformed properties QHash<QString, QVariant>::iterator it = m_properties.begin(); const QHash<QString, QVariant>::iterator end = m_properties.end(); |