summaryrefslogtreecommitdiffstats
path: root/src/dm/systems
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2019-07-29 08:35:40 +0300
committerJere Tuliniemi <jere.tuliniemi@qt.io>2019-08-01 11:15:42 +0300
commitd581af25b206411435de20a8c4f24f2ef7a74763 (patch)
tree56c96f0ad4cd86df68fda9ac15c277a861a629dc /src/dm/systems
parent6063e055c5dd38c393f78842472d87304fe97229 (diff)
Add custom shader recompilation support to the runtime
Task-number: QT3DS-3356 Task-number: QT3DS-1693 Change-Id: Iffd961f28ab5d3de74e7c4cf2c0997696284f170 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/dm/systems')
-rw-r--r--src/dm/systems/Qt3DSDMMetaData.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dm/systems/Qt3DSDMMetaData.cpp b/src/dm/systems/Qt3DSDMMetaData.cpp
index 66f56ce..996d18c 100644
--- a/src/dm/systems/Qt3DSDMMetaData.cpp
+++ b/src/dm/systems/Qt3DSDMMetaData.cpp
@@ -3875,6 +3875,9 @@ public:
{
using namespace qt3ds::render::dynamic;
+ // Remove the previous custom material entry so that the new shader code is used
+ m_CustomMaterials.erase(Intern(inObjectName));
+
std::pair<TCustomMaterialMap::iterator, bool> theInserter = m_CustomMaterials.insert(
std::make_pair(Intern(inObjectName), SMetaDataCustomMaterialImpl()));
/*if ( inStream.MoveToFirstChild( "Effect" ) == false )