summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2019-10-08 12:32:11 +0300
committerJanne Kangas <janne.kangas@qt.io>2019-11-07 12:21:46 +0200
commit1538064da0f22901bf740ecf2dab8257301bf682 (patch)
treec5f66fbb7e73f5649a35f85f5594dbfc9baf9bfb
parent9a0e1781f89895549f7dc7d3206a1406aafd0c1f (diff)
Force shader compilation on effect active
Force compilation also for effect shader as it becomes active, to catch compilation errors in Editor. Change-Id: Ic4db0ab32de6ed6436487d4d2cf4d188206a247e Task-id: QT3DS-3598 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/runtimerender/graphobjects/Qt3DSRenderEffect.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtimerender/graphobjects/Qt3DSRenderEffect.cpp b/src/runtimerender/graphobjects/Qt3DSRenderEffect.cpp
index 279946a..325073d 100644
--- a/src/runtimerender/graphobjects/Qt3DSRenderEffect.cpp
+++ b/src/runtimerender/graphobjects/Qt3DSRenderEffect.cpp
@@ -52,6 +52,8 @@ void SEffect::SetActive(bool inActive, IEffectSystem &inManager)
if (m_Context)
inManager.ResetEffectFrameData(*m_Context);
m_Flags.SetDirty(true);
+ if (inActive)
+ inManager.SetEffectRequiresCompilation(m_ClassName, true);
}
}