Browse Source

Don't issue draw call if there is nothing to draw.

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
9b18e2b3e8
  1. 2
      src/IndexedMesh.cpp
  2. 2
      src/Mesh.cpp

2
src/IndexedMesh.cpp

@ -33,6 +33,8 @@ IndexedMesh* IndexedMesh::setIndexBuffer(Buffer* buffer) {
}
void IndexedMesh::draw() {
if(!_indexCount) return;
bind();
/** @todo Start at given index */

2
src/Mesh.cpp

@ -90,6 +90,8 @@ Mesh* Mesh::setVertexCount(GLsizei vertexCount) {
}
void Mesh::draw() {
if(!_vertexCount) return;
bind();
/** @todo Start at given index */

Loading…
Cancel
Save