projects
/
traingame.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db77f70
)
Avoid rendering empty VBO chunks
author
Nick Gasson <nick@nickg.me.uk>
Fri, 30 Dec 2011 19:15:21 +0000
(19:15 +0000)
committer
Nick Gasson <nick@nickg.me.uk>
Fri, 30 Dec 2011 19:15:21 +0000
(19:15 +0000)
src/Mesh.cpp
patch
|
blob
|
history
diff --git
a/src/Mesh.cpp
b/src/Mesh.cpp
index 5e18176f189d8f858abf832d7f6e7ceab5fd4bb3..d588aadc2400742325daa006fac22a518140c467 100644
(file)
--- a/
src/Mesh.cpp
+++ b/
src/Mesh.cpp
@@
-542,6
+542,9
@@
void VBOMesh::render() const
for (vector<ChunkDelim>::const_iterator it = chunks.begin();
it != chunks.end(); ++it) {
+ if ((*it).count == 0)
+ continue;
+
if ((*it).texture) {
glEnable(GL_TEXTURE_2D);
(*it).texture->bind();