diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2018-09-28 09:44:57 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2018-09-28 06:47:06 +0000 |
commit | c8ee7bfa5a8d28ad5e9a80995c31e712ecfe64e0 (patch) | |
tree | 108639ff6c23a49a8ce57da46a6a7a3bbd8fc4f2 | |
parent | f9e0237e6798e167e672895d39525a750449932b (diff) |
Clear flag was ignored when rendering a subpresentation with
transparent background to a texture on an object.
Task-number: QT3DS-2408
Change-Id: I7578e0e4446614d68613815c77f4f84b87d8bedb
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
-rw-r--r-- | src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp b/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp index 02383dda..893ee654 100644 --- a/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp +++ b/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp @@ -252,7 +252,6 @@ void StudioSubpresentationRenderer::Render(const SOffscreenRendererEnvironment & { Q_UNUSED(inEnvironment) Q_UNUSED(inPresentationScaleFactor) - Q_UNUSED(inColorBufferNeedsClear) Q_UNUSED(instanceId) inRenderContext.PushPropertySet(); if (!m_thread->m_initialized) { @@ -265,7 +264,10 @@ void StudioSubpresentationRenderer::Render(const SOffscreenRendererEnvironment & QOpenGLFunctions *func = context->functions(); GLuint texture = m_thread->m_fbo->texture(); func->glDisable(GL_DEPTH_TEST); - func->glEnable(GL_BLEND); + if (inColorBufferNeedsClear == SScene::RenderClearCommand::AlwaysClear) + func->glDisable(GL_BLEND); + else + func->glEnable(GL_BLEND); func->glBlendEquation(GL_FUNC_ADD); func->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |