diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 83234bd32c433848cc964fe57196fb9ce6443b65..ecd450bcc83bb20619a308a1e9f7ae08abc585ad 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -1875,9 +1875,12 @@ void Renderer::uploadBatch(Batch *b) vd += g->sizeOfVertex(); } - const quint16 *id = (const quint16 *) (b->vbo.data - + b->vertexCount * g->sizeOfVertex() - + (b->merged ? b->vertexCount * sizeof(float) : 0)); + const quint16 *id = +#ifdef QSG_SEPARATE_INDEX_BUFFER + (const quint16 *) (b->ibo.data); +#else + (const quint16 *) (b->vbo.data + b->drawSets.at(0).indices); +#endif { QDebug iDump = qDebug(); iDump << " -- Index Data, count:" << b->indexCount;