summaryrefslogtreecommitdiffstats
path: root/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp')
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp
index ecf3adbe..dbf5dbad 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderContextCore.cpp
@@ -681,15 +681,12 @@ struct SRenderContext : public IQt3DSRenderContext
} else {
m_RenderContext->SetScissorTestEnabled(false);
}
- bool clearedScene = false;
{
QT3DSVec4 theClearColor;
if (m_MatteColor.hasValue())
theClearColor = m_MatteColor;
- else {
+ else
theClearColor = m_SceneColor;
- clearedScene = true;
- }
m_RenderContext->SetClearColor(theClearColor);
m_RenderContext->Clear(qt3ds::render::NVRenderClearValues::Color);
}
@@ -708,7 +705,8 @@ struct SRenderContext : public IQt3DSRenderContext
m_RotationTexture = NULL;
m_RotationDepthBuffer = NULL;
}
- if (m_SceneColor.hasValue() && !clearedScene) {
+ bool clear = m_SceneColor.getValue().w == 0.0f ? false : true;
+ if (m_SceneColor.hasValue() && clear) {
m_RenderContext->SetClearColor(m_SceneColor);
m_RenderContext->Clear(qt3ds::render::NVRenderClearValues::Color);
}