glxgears: unbind current context before "destroying" it

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>
This commit is contained in:
Marcin Slusarz 2010-01-17 14:49:34 -08:00 committed by Brian Paul
parent ccc888c39e
commit 23ae318200
1 changed files with 1 additions and 0 deletions

View 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);