summaryrefslogtreecommitdiff
path: root/tests/auto/render/commons
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-07-05 09:06:35 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-08-07 12:08:32 +0200
commit6631bf0983250e1a86cb9d27628c44b6e607609b (patch)
tree5ea8ee81d2119df25b0f2a87532f7d7d2dcf03a8 /tests/auto/render/commons
parentda2c94c13c163922467e6d88e19442fc12aea523 (diff)
downloadqt3d-6631bf0983250e1a86cb9d27628c44b6e607609b.tar.gz
Make Scene3D rendering use the Manual Qt3D drive mode
This now makes Scene3D rendering fully synchronous and blocking: - All Qt3D jobs have to be executed before we can render the GL commands This makes the blocking mode that could be activated with SCENE3D_BLOCKING_RENDERMODE the default behavior now and therefore we could remove references to it in the code. This now means that Qt3D and QtQuick will be rendering at the same refresh rate, which in most cases won't be noticeable and will ensure that content from Qt3D scenes matches content from QtQuick scenes. The only downside is if the Qt3D rendering takes longer than the time expected by QtQuick, the whole QtQuick rendering will be slowed down. Previously the QtQuick rendering might have still run at 60fps while the Qt3D rendering at a lower fps. Now the QtQuick fps would be the same as the Qt3D fps. That being said, the old behavior also meant that if Qt3D didn't catch up, the delay between QtQuick and Qt3D would only increase frame after frame. This change allow to simplify the internals by making Scene3D and regular Qt3D use the same code paths internally. Please note that Scene3D relies on QQuickWindow::afterAnimating being called each frame. When using a QQuickRenderControl this means you might have to call it manually as part of your rendering code. Task-number: QTBUG-72385 Change-Id: I887daf6df632e296a892b844e738a67e973fee7f Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests/auto/render/commons')
-rw-r--r--tests/auto/render/commons/testrenderer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/render/commons/testrenderer.h b/tests/auto/render/commons/testrenderer.h
index 124e30492..c4c1ed92b 100644
--- a/tests/auto/render/commons/testrenderer.h
+++ b/tests/auto/render/commons/testrenderer.h
@@ -52,7 +52,7 @@ public:
void shutdown() override {}
void releaseGraphicsResources() override {}
void render() override {}
- void doRender(bool scene3dBlocking = false) override { Q_UNUSED(scene3dBlocking); }
+ void doRender() override {}
void cleanGraphicsResources() override {}
bool isRunning() const override { return true; }
bool shouldRender() override { return true; }