def adjust_gl_view(w, h):
 h = max(h, 1)
 w = max(w, 1)
 glViewport(0, 0, w, h)
 glMatrixMode(GL_PROJECTION)
 glLoadIdentity()
 glOrtho(0, w, h, 0, (-1), 1)
 glMatrixMode(GL_MODELVIEW)
 glLoadIdentity()

def adjust_gl_view ( w , h ) : h = max ( h , 1 ) w = max ( w , 1 ) glViewport ( 0 , 0 , w , h ) glMatrixMode ( GL_PROJECTION ) glLoadIdentity ( ) glOrtho ( 0 , w , h , 0 , ( - 1 ) , 1 ) glMatrixMode ( GL_MODELVIEW ) glLoadIdentity ( )
adjust view onto our scene .