diff options
author | Määttä Antti <antti.maatta@theqtcompany.com> | 2016-04-20 14:24:01 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@theqtcompany.com> | 2016-04-21 09:33:57 +0000 |
commit | d4204e818b2f35293790a7ef0fd9a79ca92e6319 (patch) | |
tree | f81b3e060b9fcc375b1dd569245a6739671cb05b /src/render/graphicshelpers/graphicscontext_p.h | |
parent | 5e93098f1d1095f004ddf0e836d05f6f253deb14 (diff) |
If scene has more than one mesh, only the last one added can be modified
Remove bound check from uploadDataToGLBuffer since the buffer never
released anywhere. Instead add the bound check to the render context with
variable caching the last bound buffer.
Task-number: QTBUG-52443
Change-Id: I75d706331a8af78e1a1057fcb2cd0fd88a5519c3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext_p.h')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index c2a9785bb..1cb977b82 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -62,6 +62,7 @@ #include <Qt3DRender/private/quniformvalue_p.h> #include <Qt3DRender/qclearbuffers.h> #include <Qt3DRender/private/shader_p.h> +#include <Qt3DRender/private/glbuffer_p.h> #include <Qt3DRender/qattribute.h> #include <Qt3DRender/private/handle_types_p.h> @@ -87,7 +88,6 @@ class RenderTarget; class AttachmentPack; class Attribute; class Buffer; -class GLBuffer; enum TextureScope { @@ -236,6 +236,7 @@ private: void activateDrawBuffers(const AttachmentPack &attachments); HGLBuffer createGLBufferFor(Buffer *buffer); void uploadDataToGLBuffer(Buffer *buffer, GLBuffer *b, bool releaseBuffer = false); + bool bindGLBuffer(GLBuffer *buffer, GLBuffer::Type type); bool m_initialized; const unsigned int m_id; @@ -271,6 +272,8 @@ private: GLuint m_activeFBO; GLuint m_defaultFBO; + GLBuffer *m_boundArrayBuffer; + RenderStateSet* m_stateSet; Renderer *m_renderer; |