diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-08-22 17:02:54 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-08-23 14:04:52 +0300 |
commit | 7c45ae56c3399ea59b8a312e2f1194301020d241 (patch) | |
tree | 26739a72c0fccdb2232e84992987f2e51580137e | |
parent | 9e3cc7b01d1cbef2d353f87b0adff7e93a53888b (diff) |
Clear also effect system cache on presentation close
Uncleared caches can lead to crashes on next presentation.
Task-number: QT3DS-3894
Change-Id: I7b8a052df4c3cbfd8bb9de3aca93cbd23a4eed84
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
-rw-r--r-- | src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp b/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp index 3b9b1fd2..ef5c385c 100644 --- a/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp +++ b/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp @@ -39,6 +39,7 @@ #include "q3dsqmlstreamproxy.h" #include "StudioSubPresentationRenderer.h" #include "Qt3DSRenderCustomMaterialSystem.h" +#include "Qt3DSRenderEffectSystem.h" #include <QtCore/qdebug.h> @@ -785,8 +786,10 @@ struct SRendererImpl : public IStudioRenderer, void OnClosingPresentation() override { // Clear the shader cache so that shaders are reloaded when loading the next presentation - if (m_Context) - m_Context->GetCustomMaterialSystem().clearShaderCache(); + if (m_Context) { + m_Context->GetCustomMaterialSystem().clearCaches(); + m_Context->GetEffectSystem().clearCaches(); + } // Destroy translation m_Translation = std::shared_ptr<STranslation>(); |