mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 03:30:08 +02:00
Use glDrawRangeElements, which indicates the range of used indices. It may or
may not make a difference in performance, but it won't hurt.
This commit is contained in:
parent
fc238c0382
commit
1be859ede9
1 changed files with 2 additions and 1 deletions
|
@ -663,7 +663,8 @@ void VoxelSystem::render(bool texture) {
|
|||
// draw the number of voxels we have
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboIndicesID);
|
||||
glScalef(TREE_SCALE, TREE_SCALE, TREE_SCALE);
|
||||
glDrawElements(GL_TRIANGLES, 36 * _voxelsInReadArrays, GL_UNSIGNED_INT, 0);
|
||||
glDrawRangeElementsEXT(GL_TRIANGLES, 0, VERTICES_PER_VOXEL * _voxelsInReadArrays,
|
||||
36 * _voxelsInReadArrays, GL_UNSIGNED_INT, 0);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
|
Loading…
Reference in a new issue