glxgears: unbind current context before "destroying" it
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sun, 17 Jan 2010 22:49:34 +0000 (14:49 -0800)
committerBrian Paul <brianp@vmware.com>
Mon, 18 Jan 2010 17:44:53 +0000 (10:44 -0700)
glXDestroyContext does not destroy the context if it's still
connected to some window. Unbind context from window to test it.

Signed-off-by: Brian Paul <brianp@vmware.com>
progs/xdemos/glxgears.c

index 088f25a357ab08753bb6faa976db672734f3a3e4..2993c82416169169ef0ee27a19a3c00259651a69 100644 (file)
@@ -771,6 +771,7 @@ main(int argc, char *argv[])
    glDeleteLists(gear1, 1);
    glDeleteLists(gear2, 1);
    glDeleteLists(gear3, 1);
+   glXMakeCurrent(dpy, None, NULL);
    glXDestroyContext(dpy, ctx);
    XDestroyWindow(dpy, win);
    XCloseDisplay(dpy);