summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/renderer/renderer_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-09-27 14:31:21 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-10-21 13:35:38 +0200
commit7eb01e9532f080bef539808c0eb5e7c65cf34048 (patch)
tree5aadb0e7fcfb80a671641beb972345c4762f763a /src/render/renderers/opengl/renderer/renderer_p.h
parent7d8fd90a1d5e59b21b29da3e7fd0e593e3d94620 (diff)
Split RenderCommand generation and uniform update
In most cases, we can generate the RenderCommands once and reuse them in subsequent frames only updating the uniforms. We still have to copy the RenderCommands as the renderer renders while we start preparing the next frame. This is still faster than regenerating them entirely. Regenerating the entire commands will happen only when FrameGraph or Scene structure changes. That should rarely be happening on a per frame basis. Next step could be to look at how to only update commands for Entity with Parameters that have changed. Change-Id: I202870850a46fcd3946f81bffddb7027d192f374 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/renderers/opengl/renderer/renderer_p.h')
-rw-r--r--src/render/renderers/opengl/renderer/renderer_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/renderers/opengl/renderer/renderer_p.h b/src/render/renderers/opengl/renderer/renderer_p.h
index b1cd4aac5..db63f31d0 100644
--- a/src/render/renderers/opengl/renderer/renderer_p.h
+++ b/src/render/renderers/opengl/renderer/renderer_p.h
@@ -254,12 +254,12 @@ public:
void prepareCommandsSubmission(const QVector<RenderView *> &renderViews);
bool executeCommandsSubmission(const RenderView *rv);
bool updateVAOWithAttributes(Geometry *geometry,
- RenderCommand *command,
+ const RenderCommand *command,
Shader *shader,
bool forceUpdate);
bool requiresVAOAttributeUpdate(Geometry *geometry,
- RenderCommand *command) const;
+ const RenderCommand *command) const;
void setOpenGLContext(QOpenGLContext *context) override;
const GraphicsApiFilterData *contextInfo() const;