|
From: Johnny O. <js...@us...> - 2010-10-28 21:13:11
|
Module: performous
Branch: opengl2
Commit: a07ece3977b5f0be0b3da768a28240a85c7ef4c7
Author: Johnny Oskarsson <js...@us...>
Date: Thu Oct 28 23:11:24 2010 +0200
Fix VBO texture bug.
---
game/3dobject.hh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/game/3dobject.hh b/game/3dobject.hh
index 5e5536c..144f9db 100644
--- a/game/3dobject.hh
+++ b/game/3dobject.hh
@@ -74,7 +74,11 @@ class Object3d: boost::noncopyable {
glutil::PushMatrix pm;
glTranslatef(x, y, z); // Move to position
if (s != 1.0) glScalef(s,s,s); // Scale if needed
- if (m_texture) UseTexture tex(*m_texture);
- drawVBO();
+ if (m_texture) {
+ UseTexture tex(*m_texture);
+ drawVBO();
+ } else {
+ drawVBO();
+ }
}
};
|