dungeon_crawler
diff prototype/src/mesh.cc @ 27:cbf86e5198a9
fized the vbo state creep
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 25 Aug 2012 14:37:51 +0300 |
parents | 0588f8a1a351 |
children | d0e93b4d9ec9 |
line diff
1.1 --- a/prototype/src/mesh.cc Sat Aug 25 04:07:51 2012 +0300 1.2 +++ b/prototype/src/mesh.cc Sat Aug 25 14:37:51 2012 +0300 1.3 @@ -77,6 +77,8 @@ 1.4 } 1.5 } 1.6 glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER); 1.7 + glBindBuffer(GL_ARRAY_BUFFER, 0); 1.8 + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 1.9 return true; 1.10 } 1.11 1.12 @@ -165,6 +167,8 @@ 1.13 glDisableVertexAttribArray(tang_loc); 1.14 } 1.15 1.16 + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 1.17 + 1.18 #ifdef DBG_NORMALS 1.19 glPushAttrib(GL_ENABLE_BIT); 1.20 glDisable(GL_LIGHTING); 1.21 @@ -199,6 +203,8 @@ 1.22 glPopAttrib(); 1.23 #endif 1.24 1.25 + glBindBuffer(GL_ARRAY_BUFFER, 0); 1.26 + 1.27 glPopMatrix(); 1.28 } 1.29