takahiyn / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

missing call to glMatrixMode() in GLDebugDrawString() #273

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In Bullet 2.75, the GLDebugDrawString() function in GL_DebugFont.cpp does
performs manipulations of the OpenGL matrix stack.  When it's finished, the
most recent call to glMatrixMode() was set to GL_TEXTURE.  Subsequent code
in the GL Debug Drawer seems to assume that the current matrix mode is
GL_MODELVIEW, which can cause future calls to glPushMatrix() to be applied
to the wrong matrix stack.  This quickly leads to OpenGL errors -- matrix
underflow in the modelview stack, and overflow in the texture stack.

It looks like the easiest fix is to add a call to
glMatrixMode(GL_MODELVIEW) at the end of GLDebugDrawString().

Original issue reported on code.google.com by cstrat...@gmail.com on 11 Sep 2009 at 6:41

GoogleCodeExporter commented 9 years ago
Good find, something went wrong but we didn't find the reason.

Applied in the latest trunk, thanks a lot!

Original comment by erwin.coumans on 17 Sep 2009 at 9:23