Examples now support both 16 and 32 bit indices.

This commit is contained in:
David Williams
2014-08-13 15:59:13 +02:00
parent d4118a2052
commit f1ed0c1be2
2 changed files with 13 additions and 9 deletions

View File

@ -161,7 +161,7 @@ void OpenGLWidget::paintGL()
// Bind the vertex array for the current mesh
glBindVertexArray(meshData.vertexArrayObject);
// Draw the mesh
glDrawElements(GL_TRIANGLES, meshData.noOfIndices, GL_UNSIGNED_INT, 0);
glDrawElements(GL_TRIANGLES, meshData.noOfIndices, meshData.indexType, 0);
// Unbind the vertex array.
glBindVertexArray(0);
}