Fix #19391: quiting BGE could give drawing errors. Blender now restores
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 21 Sep 2009 21:37:19 +0000 (21:37 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 21 Sep 2009 21:37:19 +0000 (21:37 +0000)
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.

source/blender/editors/space_view3d/view3d_view.c

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