-/* $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
+/* 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.
-/* $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
+/* 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 )
{
-/* $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
(void) name;
return 0;
}
+
+
+
+/* GLX 1.2 and later */
+Display *Real_glXGetCurrentDisplay( void )
+{
+ return 0;
+}
+
+
-/* $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
extern const char *Real_glXGetClientString( Display *dpy, int name );
+/* GLX 1.2 and later */
+extern Display *Real_glXGetCurrentDisplay( void );
+
+
#endif