-/* $Id: fakeglx.c,v 1.52 2001/05/25 21:51:02 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.53 2001/05/29 23:15:07 brianp Exp $ */
/*
* Mesa 3-D graphics library
((__GLXcontext *) ctx)->currentDpy = dpy;
((__GLXcontext *) ctx)->currentDrawable = draw;
((__GLXcontext *) ctx)->currentReadable = read;
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
+ printf("Set fake context ctx %p\n", ctx);
__glXSetCurrentContext(ctx);
#endif
return True;
MakeCurrent_PrevReadable = 0;
MakeCurrent_PrevDrawBuffer = 0;
MakeCurrent_PrevReadBuffer = 0;
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* XXX bind dummy context with __glXSetCurrentContext(ctx); */
#endif
return True;
-/* $Id: glxapi.c,v 1.26 2001/05/29 19:48:46 brianp Exp $ */
+/* $Id: glxapi.c,v 1.27 2001/05/29 23:15:07 brianp Exp $ */
/*
* Mesa 3-D graphics library
{
struct _glxapi_table *t = NULL;
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
if (!getenv("LIBGL_FORCE_XMESA")) {
int ignore;
if (XQueryExtension( dpy, "GLX", &ignore, &ignore, &ignore )) {
if (!t) {
/* Fallback to Mesa with Xlib driver */
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
if (getenv("LIBGL_DEBUG")) {
fprintf(stderr,
- "libGL: server lacks GLX extension. Using Mesa Xlib renderer.\n");
+ "libGL: server %s lacks the GLX extension.",
+ dpy->display_name);
+ fprintf(stderr, " Using Mesa Xlib renderer.\n");
}
#endif
t = _mesa_GetGLXDispatchTable();
/* Set by glXMakeCurrent() and glXMakeContextCurrent() only */
-#ifndef GLX_BUILD_IN_XLIB_MESA
+#ifndef GLX_BUILT_IN_XMESA
static GLXContext CurrentContext = 0;
#define __glXGetCurrentContext() CurrentContext;
#endif
}
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use real libGL's glXGetCurrentContext() function */
#else
/* stand-alone Mesa */
#endif
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use real libGL's glXGetCurrentContext() function */
#else
/* stand-alone Mesa */
Bool b;
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
- if (!t)
+ if (!t) {
return False;
+ }
b = (*t->MakeCurrent)(dpy, drawable, ctx);
-#ifndef GLX_BUILD_IN_XLIB_MESA
+#ifndef GLX_BUILT_IN_XMESA
if (b) {
CurrentContext = ctx;
}
/*** GLX_VERSION_1_2 ***/
-#if !defined(GLX_BUILD_IN_XLIB_MESA)
+#if !defined(GLX_BUILT_IN_XMESA)
Display *glXGetCurrentDisplay(void)
{
/* Same code as in libGL's glxext.c */
}
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use the glXGetCurrentReadDrawable() function from libGL */
#else
GLXDrawable glXGetCurrentReadDrawable(void)
if (!t)
return False;
b = (t->MakeContextCurrent)(dpy, draw, read, ctx);
-#ifndef GLX_BUILD_IN_XLIB_MESA
+#ifndef GLX_BUILT_IN_XMESA
if (b) {
CurrentContext = ctx;
}
return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx);
}
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use glXGetCurrentReadDrawableSGI() from libGL */
#else
/* stand-alone Mesa */
(t->FreeContextEXT)(dpy, context);
}
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use real libGL's glXGetContextIDEXT() function */
#else
/* stand-alone Mesa */
}
#endif
-#ifdef GLX_BUILD_IN_XLIB_MESA
+#ifdef GLX_BUILT_IN_XMESA
/* Use real libGL's glXGetCurrentDisplayEXT() function */
#else
/* stand-alone Mesa */