Small performance improvement in opengl drawing

This commit is contained in:
Michaël Lemaire 2015-09-15 18:18:24 +02:00
parent 4fb7078815
commit 6e45fc4c2f

View file

@ -132,7 +132,7 @@ public:
program->setAttributeArray(uv, GL_FLOAT, (void*)(ptr + offsetof(Vertex, uv)), 2, sizeof(Vertex));
program->enableAttributeArray(uv);
functions->glDrawElements(GL_TRIANGLES, index_count, GL_UNSIGNED_SHORT, indices);
functions->glDrawRangeElements(GL_TRIANGLES, 0, vertex_count - 1, index_count, GL_UNSIGNED_SHORT, indices);
program->disableAttributeArray(vertex);
program->disableAttributeArray(uv);