aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-01-14 12:00:56 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-01-16 12:46:52 +0100
commit291aea14636a0e779d874a01630524facb1397dd (patch)
tree044ff4131a9b3f5a3edb00e6a807d0609c04a182 /src/quick/scenegraph/coreapi
parent39f1e0d66dc434e764731fbfed29c8fd98d217aa (diff)
parent88e87647c3b7d651dba2c8e61f945d47ecdd02c4 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
Diffstat (limited to 'src/quick/scenegraph/coreapi')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index aef5b4ee79..fd9b2a4480 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -2828,7 +2828,10 @@ void Renderer::visualizeBatch(Batch *b)
g = gn->geometry();
shader->setUniformValue(shader->matrix, matrix * *gn->matrix());
glVertexAttribPointer(a.position, a.tupleSize, a.type, false, g->sizeOfVertex(), (void *) (qintptr) offset);
- glDrawElements(g->drawingMode(), g->indexCount(), g->indexType(), g->indexData());
+ if (g->indexCount())
+ glDrawElements(g->drawingMode(), g->indexCount(), g->indexType(), g->indexData());
+ else
+ glDrawArrays(g->drawingMode(), 0, g->vertexCount());
offset += g->sizeOfVertex() * g->vertexCount();
e = e->nextInBatch;
}