File: check_crash_on_glutinit.py

package info (click to toggle)
pyopengl 3.1.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,668 kB
  • sloc: python: 108,024; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13

if __name__ == "__main__":
    from OpenGL.GLUT import *
    from OpenGL.GL import *
    glutInit( ' ' )
    glutInitDisplayMode( GLUT_SINGLE )
    window = glutCreateWindow("hello")
    glutDisplayFunc( lambda *args: 1 )
    #glutMainLoop()
    try:
        if fgDeinitialize: fgDeinitialize(False)
    except NameError as err:
        pass # Older PyOpenGL, you may see a seg-fault here...