summaryrefslogtreecommitdiff
path: root/GL/glx/glxext.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-10-05 22:39:41 +0000
committerAdam Jackson <ajax@nwnk.net>2005-10-05 22:39:41 +0000
commit61cd478b545de0313271cf6852e2df770e8f5914 (patch)
tree85008627fa96f7464fdc99e9609cac2098729e83 /GL/glx/glxext.c
parente891d9c078bd31447ae3e1fc7f8c15953b0bb916 (diff)
Bug #3652: Server-side GLX support for GLX_SGIX_swap_barrier and
GLX_SGIX_hyperpipe extensions. (Eric Kunze, SGI)
Diffstat (limited to 'GL/glx/glxext.c')
-rw-r--r--GL/glx/glxext.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index 6e0ced935..fa1382983 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -180,6 +180,18 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
return GL_TRUE;
}
+extern RESTYPE __glXSwapBarrierRes;
+
+static int SwapBarrierGone(int screen, XID drawable)
+{
+ if (__glXSwapBarrierFuncs &&
+ __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc != NULL) {
+ __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc(screen, drawable, 0);
+ }
+ FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE);
+ return True;
+}
+
/************************************************************************/
/*
@@ -256,6 +268,8 @@ void GlxExtensionInit(void)
__glXUnsupportedPrivateRequest = extEntry->errorBase +
GLXUnsupportedPrivateRequest;
+ __glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
+
/*
** Initialize table of client state. There is never a client 0.
*/