aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/indirect.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-30 11:17:14 +0100
committermarha <marha@users.sourceforge.net>2012-01-30 11:17:14 +0100
commitc69f5d9bd34d3fd3738c000f5d91ceb26770f7e5 (patch)
tree3cee6b4fc9ac4c54ac0068c187edf0dcdabfb515 /xorg-server/hw/xwin/glx/indirect.c
parent9126bebe40113c6bbe0af98d4dd5fc607b85894e (diff)
downloadvcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.tar.gz
vcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.tar.bz2
vcxsrv-c69f5d9bd34d3fd3738c000f5d91ceb26770f7e5.zip
call glapi_set_dispatch to NULL when context is not current anymore
Diffstat (limited to 'xorg-server/hw/xwin/glx/indirect.c')
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index f9d623cb2..6b1265d70 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -1609,6 +1609,7 @@ glxWinContextMakeCurrent(__GLXcontext *base)
{
glxWinDeferredCreateContext(gc, drawPriv);
}
+ _glapi_set_dispatch(gc->Dispatch);
if (gc->ctx == NULL)
{
@@ -1696,6 +1697,7 @@ glxWinContextLoseCurrent(__GLXcontext *base)
}
base->isCurrent=FALSE; /* It looks like glx is not doing this */
+ _glapi_set_dispatch(NULL);
return ret;
}
@@ -1753,6 +1755,7 @@ glxWinContextDestroy(__GLXcontext *base)
free(gc->Dispatch);
free(gc);
+ _glapi_set_dispatch(NULL);
}
}
@@ -1787,7 +1790,7 @@ glxWinCreateContext(__GLXscreen *screen,
// actual native GL context creation is deferred until attach()
//context->ctx = NULL; already done with memset
context->shareContext = shareContext;
-
+
context->Dispatch=calloc(sizeof(void*), (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS));
_glapi_set_dispatch(context->Dispatch);