From 54821191c60a926b2b7d1ed296a5b9ea314b0a12 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 30 Dec 2011 19:15:21 +0000 Subject: [PATCH] Avoid rendering empty VBO chunks --- src/Mesh.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 5e18176..d588aad 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -542,6 +542,9 @@ void VBOMesh::render() const for (vector::const_iterator it = chunks.begin(); it != chunks.end(); ++it) { + if ((*it).count == 0) + continue; + if ((*it).texture) { glEnable(GL_TEXTURE_2D); (*it).texture->bind(); -- 2.39.2