diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-06-25 12:47:00 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-06-28 09:31:06 +0300 |
commit | 3a014b324f1948192cb973c62c40150464ce5aa2 (patch) | |
tree | d39fc14754d878313d94d256f0f1f79d9209f650 /src/runtimerender/graphobjects/Qt3DSRenderScene.cpp | |
parent | a0eef0c702b06e442db90a3b6ef1b488e67b63f5 (diff) |
Fix progressive antialiasing
There were two problems with the antialiasing. The default materials
inside container were never cleared dirty. The subpresentation rendering
didn't correctly set the dirty flags when the same subpresentation is
rendered multiple times.
Task-number: QT3DS-1796
Change-Id: Ice1942ec4b919df009c59aa3ffdfc8efd430db1e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Jari Karppinen <jari.karppinen@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Diffstat (limited to 'src/runtimerender/graphobjects/Qt3DSRenderScene.cpp')
-rw-r--r-- | src/runtimerender/graphobjects/Qt3DSRenderScene.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtimerender/graphobjects/Qt3DSRenderScene.cpp b/src/runtimerender/graphobjects/Qt3DSRenderScene.cpp index 7917bd7..7049035 100644 --- a/src/runtimerender/graphobjects/Qt3DSRenderScene.cpp +++ b/src/runtimerender/graphobjects/Qt3DSRenderScene.cpp @@ -37,8 +37,8 @@ using namespace qt3ds::render; SScene::SScene() : SGraphObject(GraphObjectTypes::Scene) - , m_Presentation(NULL) - , m_FirstChild(NULL) + , m_Presentation(nullptr) + , m_FirstChild(nullptr) , m_ClearColor(0.0f) , m_UseClearColor(true) , m_Dirty(true) @@ -47,7 +47,7 @@ SScene::SScene() void SScene::AddChild(SLayer &inLayer) { - if (m_FirstChild == NULL) + if (m_FirstChild == nullptr) m_FirstChild = &inLayer; else GetLastChild()->m_NextSibling = &inLayer; @@ -71,6 +71,7 @@ bool SScene::PrepareForRender(const QT3DSVec2 &inViewportDimensions, IQt3DSRende // We need to iterate through the layers in reverse order and ask them to render. bool wasDirty = m_Dirty; m_Dirty = false; + if (m_FirstChild) { wasDirty |= inContext.GetRenderer().PrepareLayerForRender(*m_FirstChild, inViewportDimensions, |