#NEWLINE# @ window . event #NEWLINE# def on_resize( width , height ) : #NEWLINE# #INDENT# if ( height == 0 ) : #NEWLINE# #INDENT# height = 1 #NEWLINE# #UNINDENT# glViewport ( 0 , 0 , width , height ) #NEWLINE# glMatrixMode ( GL_PROJECTION ) #NEWLINE# glLoadIdentity ( ) #NEWLINE# gluPerspective ( 60.0 , ( width / float ( height ) ) , 0.1 , 1000.0 ) #NEWLINE# glMatrixMode ( GL_MODELVIEW ) #NEWLINE# return pyglet . event . EVENT_HANDLED