From e4c3c2a1a22619a951e377ed6dcb5846f4c2009d Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Tue, 23 Feb 2010 03:11:18 +0000 Subject: [PATCH] Fix Issue 342, related to OpenGL GL_ShapeDrawer (when used with multiple OpenGL contexts) --- Demos/OpenGL/GL_ShapeDrawer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Demos/OpenGL/GL_ShapeDrawer.cpp b/Demos/OpenGL/GL_ShapeDrawer.cpp index 5a43f4d20..850f70b6d 100644 --- a/Demos/OpenGL/GL_ShapeDrawer.cpp +++ b/Demos/OpenGL/GL_ShapeDrawer.cpp @@ -522,14 +522,13 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons gluBuild2DMipmaps(GL_TEXTURE_2D,3,256,256,GL_RGB,GL_UNSIGNED_BYTE,image); delete[] image; - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glScalef(0.025f,0.025f,0.025f); - } - + glMatrixMode(GL_TEXTURE); + glLoadIdentity(); + glScalef(0.025f,0.025f,0.025f); + glMatrixMode(GL_MODELVIEW); static const GLfloat planex[]={1,0,0,0}; // static const GLfloat planey[]={0,1,0,0};