summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-11-22 21:52:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-11-22 21:52:23 +0000
commitb82d993b03320818f88f792a9e713f7ed491bfcb (patch)
tree97b9a4838c76023836f9f95092aded196bb94a4c /src/mesa/drivers
parentbf3f9bdaae9f17de8ac82ec7789e4e689a6f67f2 (diff)
downloadexternal_mesa3d-b82d993b03320818f88f792a9e713f7ed491bfcb.zip
external_mesa3d-b82d993b03320818f88f792a9e713f7ed491bfcb.tar.gz
external_mesa3d-b82d993b03320818f88f792a9e713f7ed491bfcb.tar.bz2
added glXGetCurrentDisplay() for GLX 1.2
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c14
-rw-r--r--src/mesa/drivers/x11/glxapi.c15
-rw-r--r--src/mesa/drivers/x11/realglx.c12
-rw-r--r--src/mesa/drivers/x11/realglx.h6
4 files changed, 43 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 19224ff..aca758f 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.14 1999/11/18 15:17:01 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.15 1999/11/22 21:52:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1485,6 +1485,18 @@ const char *Fake_glXGetClientString( Display *dpy, int name )
+/* GLX 1.2 and later */
+Display *Fake_glXGetCurrentDisplay( void )
+{
+ XMesaContext xmesa = XMesaGetCurrentContext();
+ if (xmesa && xmesa->xm_visual)
+ return xmesa->xm_visual->display;
+ else
+ return NULL;
+}
+
+
+
/*
* Release the depth, stencil, accum buffers attached to a GLXDrawable
* (a window or pixmap) prior to destroying the GLXDrawable.
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index f845b5a..d48f315 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -1,4 +1,4 @@
-/* $Id: glxapi.c,v 1.4 1999/10/27 09:50:10 brianp Exp $ */
+/* $Id: glxapi.c,v 1.5 1999/11/22 21:52:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -348,6 +348,19 @@ const char *glXGetClientString( Display *dpy, int name )
+/* GLX 1.2 and later */
+Display *glXGetCurrentDisplay( void )
+{
+#ifdef REALGLX
+ if (display_has_glx(dpy))
+ return Real_glXGetCurrentDisplay();
+ else
+#endif
+ return Fake_glXGetCurrentDisplay();
+}
+
+
+
#ifdef GLX_MESA_release_buffers
Bool glXReleaseBuffersMESA( Display *dpy, Window w )
{
diff --git a/src/mesa/drivers/x11/realglx.c b/src/mesa/drivers/x11/realglx.c
index 79a2804..29d7398 100644
--- a/src/mesa/drivers/x11/realglx.c
+++ b/src/mesa/drivers/x11/realglx.c
@@ -1,4 +1,4 @@
-/* $Id: realglx.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
+/* $Id: realglx.c,v 1.2 1999/11/22 21:52:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -237,3 +237,13 @@ const char *Real_glXGetClientString( Display *dpy, int name )
(void) name;
return 0;
}
+
+
+
+/* GLX 1.2 and later */
+Display *Real_glXGetCurrentDisplay( void )
+{
+ return 0;
+}
+
+
diff --git a/src/mesa/drivers/x11/realglx.h b/src/mesa/drivers/x11/realglx.h
index 9587db6..4f19f05 100644
--- a/src/mesa/drivers/x11/realglx.h
+++ b/src/mesa/drivers/x11/realglx.h
@@ -1,4 +1,4 @@
-/* $Id: realglx.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
+/* $Id: realglx.h,v 1.2 1999/11/22 21:52:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -108,4 +108,8 @@ extern const char *Real_glXQueryServerString( Display *dpy, int screen,
extern const char *Real_glXGetClientString( Display *dpy, int name );
+/* GLX 1.2 and later */
+extern Display *Real_glXGetCurrentDisplay( void );
+
+
#endif