summaryrefslogtreecommitdiffstats
path: root/src/render/backend/managers_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-11-21 14:12:22 +0000
committerSean Harmer <sean.harmer@kdab.com>2015-11-23 14:58:59 +0000
commit2d3df2c012b687076d853844916ebf8122cb71be (patch)
tree0bdf2c0d0d1dde54dce349cae9e87fe0dd0d6373 /src/render/backend/managers_p.h
parent85ffad3142cd4c3baa0bb77b0674a17287b01534 (diff)
Track whether the vao has had attributes specified or not
In some cases the VAO was being created but there wasn't any input attributes specified on the shader at that time which skipped the specification of the attributes in updateBuffersAndAttributes(). We now track whether the VAO has been specified as part of the VAO object itself. This way, the first time the VAO is actually used to draw something we can ensure the attributes have been specified. Also skip the draw calls if the primitive count is zero. Change-Id: Iad0a1cff4677ab33369057a6000f0f4a18dc5c58 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/backend/managers_p.h')
-rw-r--r--src/render/backend/managers_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/backend/managers_p.h b/src/render/backend/managers_p.h
index 907a690ea..e1d4b2d4e 100644
--- a/src/render/backend/managers_p.h
+++ b/src/render/backend/managers_p.h
@@ -72,6 +72,7 @@
#include <Qt3DRender/private/geometry_p.h>
#include <Qt3DRender/private/objectpicker_p.h>
#include <Qt3DRender/private/boundingvolumedebug_p.h>
+#include <Qt3DRender/private/openglvertexarrayobject_p.h>
QT_BEGIN_NAMESPACE
@@ -226,7 +227,7 @@ public:
};
class VAOManager : public Qt3DCore::QResourceManager<
- QOpenGLVertexArrayObject *,
+ OpenGLVertexArrayObject,
QPair<HGeometry, HShader>,
16>
{