Fix #19391: quiting BGE could give drawing errors. Blender now restores

the default OpenGL state after exiting the game engine, and also removed
settings the default state on start, since the game engine already does
this.
This commit is contained in:
Brecht Van Lommel 2009-09-21 21:37:19 +00:00
parent 345169d1fb
commit 9182dc3b8f

@ -1416,8 +1416,6 @@ static void SaveState(bContext *C)
glPushAttrib(GL_ALL_ATTRIB_BITS); glPushAttrib(GL_ALL_ATTRIB_BITS);
GPU_state_init();
if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) if(obact && obact->mode & OB_MODE_TEXTURE_PAINT)
GPU_paint_set_mipmap(1); GPU_paint_set_mipmap(1);
@ -1446,6 +1444,8 @@ static void RestoreState(bContext *C)
win->queue= queue_back; win->queue= queue_back;
GPU_state_init();
glPopAttrib(); glPopAttrib();
} }