Richard Jones' Log: pyglet - another turning-point
"incidentally, did you try releasing the context before destroying it?" was the fateful message from Alex that eventually resolved the problems Anthony was having with his older Linux ATI drivers and pyglet's tests.
A recap: when running even the simplest code, Anthony was getting X11 crashes when we attempted to use the GLX API call glXDestroyContext(). A Google search of the symptoms and so forth resulted in a general consensus that there was a bug in the older ATI drivers meaning that glXDestroyContext() just couldn't be called there.
Today over jabber Anthony (in "test monkey" mode) and I spent some time trying to debug the problems he's been having. We resolved quite a few of them, resulting in him being able to run the example programs and start running the test suite. Unfortunately we still hit a big hurdle in the test suite as soon as it tried to open up windows in successive tests.
We narrowed the problem down some more, but weren't really having much luck until Alex happened to log into jabber and sent the message above. Very quickly we had a correct clearing and releasing of the context before window close and suddenly everything's working, including glXDestroyContext!
So here's the (Python) code, if anyone stumbles on this post while searching for the answer I was trying to find...
glFlush() glXMakeCurrent(display, 0, 0) XDestroyWindow(display, window) glXDestroyContext(display, context)
Oh, and regarding my comment yesterday about implementing extension checking pre-GLX-1.1 -- er, there were no extensions in GLX 1.0, so there's no way to query for them :)