opengl: release context in glx_destroy
GLX context is not destroyed immediately after calling glXDestroyContext. It is only destroyed when it's no longer being used. So make sure to release the context Fixes #381 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
17831a7be3
commit
701eb0a2f3
|
@ -245,6 +245,7 @@ void glx_destroy(session_t *ps) {
|
||||||
|
|
||||||
// Destroy GLX context
|
// Destroy GLX context
|
||||||
if (ps->psglx->context) {
|
if (ps->psglx->context) {
|
||||||
|
glXMakeCurrent(ps->dpy, None, NULL);
|
||||||
glXDestroyContext(ps->dpy, ps->psglx->context);
|
glXDestroyContext(ps->dpy, ps->psglx->context);
|
||||||
ps->psglx->context = NULL;
|
ps->psglx->context = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue