Форум сайта python.su
Допустим вот такой код.
from OpenGL.GLUT import *
from OpenGL.GL import *
def display( *args ):
glClearColor(1.0, 1.0, 1.0, 0)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
glutSwapBuffers ( )
def main():
global wndW, wndH
glutInit( sys.argv )
glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH )
glutInitWindowSize( wndW, wndH )
glutInitWindowPosition( 0, 0 )
glutCreateWindow( sys.argv[0] )
glutDisplayFunc( display )
glutMainLoop( )
print("I cannot see this")
if __name__ == "__main__":
main()
Офлайн