diff options
author | Tony Leinonen <tony.leinonen@qt.io> | 2020-09-25 15:13:16 +0300 |
---|---|---|
committer | Tony Leinonen <tony.leinonen@qt.io> | 2020-09-28 08:20:55 +0300 |
commit | 75b79bc005ddfab416072a357ae8a807bae2d370 (patch) | |
tree | 6e68cdfc5bdd541febe7f697db569b83afb90ac1 | |
parent | 8a5a8ec2d6cc1cadaafaeed922abc96a2599fa6c (diff) |
Make editor window use depth prepass
If a layers depth prepass is disabled the selection box will
show on top of the object. Enabling it for the editor only makes it
render with depth.
Task-number: QT3DS-4174
Change-Id: I8c2164ee8a1b23d2bbd528f589e946d7971c4644
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
-rw-r--r-- | src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp index b07d01ed..40f47962 100644 --- a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp +++ b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp @@ -2834,6 +2834,13 @@ void STranslation::Render(int inWidgetId, bool inDrawGuides, bool scenePreviewPa if (scenePreviewPass) { m_Context.GetRenderContext().SetViewport(GetPreviewViewport()); m_Context.SetSceneColor(Option<QT3DSVec4>()); + + SLayer *child = m_Scene->m_FirstChild; + do { + child->m_Flags.SetLayerEnableDepthPrepass(true); + child = (SLayer *)child->m_NextSibling; + } while (child); + } m_Scene->PrepareForRender(m_Context); |