Mesa (mesa_7_7_branch): glxgears: unbind current context before "destroying " it

Brian Paul brianp at kemper.freedesktop.org
Mon Jan 18 17:48:44 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 23ae31820042f2bc4694f7c48696a697d674b802
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23ae31820042f2bc4694f7c48696a697d674b802

Author: Marcin Slusarz <marcin.slusarz at gmail.com>
Date:   Sun Jan 17 14:49:34 2010 -0800

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 at vmware.com>

---

 progs/xdemos/glxgears.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c
index 088f25a..2993c82 100644
--- a/progs/xdemos/glxgears.c
+++ b/progs/xdemos/glxgears.c
@@ -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);




More information about the mesa-commit mailing list