diff options
author | Antti Määttä <antti.maatta@qt.io> | 2020-01-17 07:57:05 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2020-01-22 13:28:49 +0200 |
commit | 88849a83a6f9ca3524cf3ba32c3a4ed7e6fabdb9 (patch) | |
tree | cbe79006339b63245381cef7e2822cbbf01dcae9 /src/api/studio3dqml/q3dsrenderer_p.h | |
parent | 7a49e1bdc590f0d3f397dd04355fd165bbd1cb86 (diff) |
Don't render when scene is not changing
Reduce CPU and GPU load by checking if the scene has changed and render
only if it has.
Task-number: QT3DS-4042
Change-Id: I54e447760f04fdad8d64319f326245175b471331
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/api/studio3dqml/q3dsrenderer_p.h')
-rw-r--r-- | src/api/studio3dqml/q3dsrenderer_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/studio3dqml/q3dsrenderer_p.h b/src/api/studio3dqml/q3dsrenderer_p.h index 0817494..dbc85a2 100644 --- a/src/api/studio3dqml/q3dsrenderer_p.h +++ b/src/api/studio3dqml/q3dsrenderer_p.h @@ -89,7 +89,7 @@ protected: static void onInitHandler(void *userData); static void onUpdateHandler(void *userData); bool initializeRuntime(QOpenGLFramebufferObject *inFbo); - void draw(); + bool draw(); void render() override; void synchronize(QQuickFramebufferObject *inView) override; void releaseRuntime(); |