diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-07-01 08:31:39 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-07-05 08:17:11 +0000 |
commit | 885610d28e183b8f49b7f5adc50223cd096d3286 (patch) | |
tree | da6d556bb61cd3099b9c0dcb29f37753eb1729c5 /src/render/graphicshelpers/graphicscontext_p.h | |
parent | 1396863a0d03511a1ceea40f4242b1f1df219b41 (diff) |
Renderer: decouple buffer/texture updates from draw commands
This will make it easier to perform the draw command submission concurrently
with the jobs preparing the next frame.
1) Update Buffers, Textures and load shaders
2) Update/Create VAO and store draw information in RenderCommand
(part of this will later be moved into the RenderCommand builder jobs)
3) Submit the draw commands
Later on it should be able to proceed to the next frame somewhere between 2
and 3. That does imply that everything is cached for the draw commands to be
performed without conflicting if the backend node changes.
Change-Id: Ic54ff85a01621579722035bd194783bc4e61e58d
Task-number: QTBUG-54423
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext_p.h')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index 65c62bda8..43a7f1a01 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -147,10 +147,11 @@ public: void setRenderer(Renderer *renderer); - void specifyAttribute(const Attribute *attribute, Buffer *buffer, const QString &shaderName); + void specifyAttribute(const Attribute *attribute, Buffer *buffer, int attributeLocation); void specifyIndices(Buffer *buffer); void updateBuffer(Buffer *buffer); void releaseBuffer(Qt3DCore::QNodeId bufferId); + bool hasGLBufferForBuffer(Buffer *buffer); void setParameters(ShaderParameterPack ¶meterPack); |