[PyOpenGL-Users] crash on import on Mac OS X after xml-generation merge explained
Brought to you by:
mcfletch
From: rndblnch <rnd...@gm...> - 2014-01-21 11:48:00
|
hello, i finally managed to get some time to look at the early crash on Mac OS X that occurs on "from OpenGL import GL" since the xml-generation merge. it turns out that somehow, the import process triggers a call to glGetString. and if no opengl context is initialized at this point, it segfaults. however, if the import is done after a proper context is initialized, the import works and seams functional (no extensive testing though). the minimal program below works for me (notice the gl import after the glutCreateWindow). hope this helps, renaud from OpenGL.GLUT import * glutInit() glutCreateWindow("test") from OpenGL.GL import * def display(): glClear(GL_COLOR_BUFFER_BIT) glutSwapBuffers() def reshape(w, h): glViewport(0, 0, w, h) glutPostRedisplay() glutDisplayFunc(display) glutReshapeFunc(reshape) glutMainLoop() |