Small performance improvement in opengl drawing
This commit is contained in:
parent
4fb7078815
commit
6e45fc4c2f
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ public:
|
||||||
program->setAttributeArray(uv, GL_FLOAT, (void*)(ptr + offsetof(Vertex, uv)), 2, sizeof(Vertex));
|
program->setAttributeArray(uv, GL_FLOAT, (void*)(ptr + offsetof(Vertex, uv)), 2, sizeof(Vertex));
|
||||||
program->enableAttributeArray(uv);
|
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(vertex);
|
||||||
program->disableAttributeArray(uv);
|
program->disableAttributeArray(uv);
|
||||||
|
|
Loading…
Reference in a new issue