public static void enterSafeBlock ( ) { if ( inSafe ) { return ; } Renderer . get ( ) . flush ( ) ; lastUsed = TextureImpl . getLastBind ( ) ; TextureImpl . bindNone ( ) ; GL11 . glPushAttrib ( GL11 . GL_ALL_ATTRIB_BITS ) ; GL11 . glPushClientAttrib ( GL11 . GL_ALL_CLIENT_ATTRIB_BITS ) ; GL11 . glMatrixMode ( GL11 . GL_MODELVIEW ) ; GL11 . glPushMatrix ( ) ; GL11 . glMatrixMode ( GL11 . GL_PROJECTION ) ; GL11 . glPushMatrix ( ) ; GL11 . glMatrixMode ( GL11 . GL_MODELVIEW ) ; inSafe = true ; }
Enter a safe block ensuring that all the OpenGL state that slick uses is safe before touching the GL state directly .