aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-18 13:37:02 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-18 13:37:02 +0100
commitba05397ad723fa19125eb5ca2f91c7f437b21484 (patch)
treee236df3317828f02ec1e8f28d87125bcc286b2d9 /src/quick/scenegraph/coreapi
parentb2c71d6518143b3d2a9bd3aef1d72ee5929891fc (diff)
parent0e64bd96fbf26855a65e38847083dbd2c6bee4ac (diff)
Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts: .qmake.conf tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp Change-Id: I7feb9772fc35066f56b7c073482b53ca8c86c70b
Diffstat (limited to 'src/quick/scenegraph/coreapi')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 5c39242029..e99af2f4ef 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -440,7 +440,9 @@ struct Batch
mutable uint uploadedThisFrame : 1; // solely for debugging purposes
Buffer vbo;
+#ifdef QSG_SEPARATE_INDEX_BUFFER
Buffer ibo;
+#endif
QDataBuffer<DrawSet> drawSets;
};
@@ -743,7 +745,9 @@ private:
ClipType m_currentClipType;
QDataBuffer<char> m_vertexUploadPool;
+#ifdef QSG_SEPARATE_INDEX_BUFFER
QDataBuffer<char> m_indexUploadPool;
+#endif
// For minimal OpenGL core profile support
QOpenGLVertexArrayObject *m_vao;
@@ -763,7 +767,10 @@ Batch *Renderer::newBatch()
m_batchPool.resize(size - 1);
} else {
b = new Batch();
- memset(&b->vbo, 0, sizeof(Buffer) * 2); // Clear VBO & IBO
+ memset(&b->vbo, 0, sizeof(Buffer));
+#ifdef QSG_SEPARATE_INDEX_BUFFER
+ memset(&b->ibo, 0, sizeof(Buffer));
+#endif
}
b->init();
return b;