-/* $Id: glxapi.c,v 1.25 2001/05/29 16:23:26 brianp Exp $ */
+/* $Id: glxapi.c,v 1.26 2001/05/29 19:48:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
#ifdef GLX_BUILD_IN_XLIB_MESA
if (getenv("LIBGL_DEBUG")) {
fprintf(stderr,
- "libGL: server lacks GLX extension. Using Mesa Xlib renderer.");
+ "libGL: server lacks GLX extension. Using Mesa Xlib renderer.\n");
}
#endif
t = _mesa_GetGLXDispatchTable();
}
#endif
+#ifdef GLX_BUILD_IN_XLIB_MESA
+/* Use real libGL's glXGetCurrentDisplayEXT() function */
+#else
+/* stand-alone Mesa */
Display *glXGetCurrentDisplayEXT(void)
{
return glXGetCurrentDisplay();
}
+#endif
GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID)
{
-/* $Id: glxheader.h,v 1.3 2001/01/08 04:06:20 keithw Exp $ */
+/* $Id: glxheader.h,v 1.4 2001/05/29 19:48:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
#else
-# ifdef GLX_DIRECT_RENDERING
-# include "dri_mesaint.h"
-# endif
# include <X11/Xlib.h>
# include <X11/Xutil.h>
# ifdef USE_XSHM /* was SHM */
-/* $Id: xm_api.c,v 1.22 2001/05/03 14:11:18 brianp Exp $ */
+/* $Id: xm_api.c,v 1.23 2001/05/29 19:48:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
ctx->Driver.UpdateState = xmesa_update_state;
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- c->driContextPriv = driContextPriv;
-#endif
-
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext( ctx );
}
#endif
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- b->driDrawPriv = driDrawPriv;
-#endif
-
return b;
}
return NULL;
}
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- b->driDrawPriv = driDrawPriv;
-#endif
-
return b;
}
else
#endif
{
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- XMesaDriSwapBuffers( b );
-#else
/*_glthread_LOCK_MUTEX(_xmesa_lock);*/
XMesaPutImage( b->xm_visual->display, b->frontbuffer,
b->cleargc,
b->backimage, 0, 0,
0, 0, b->width, b->height );
/*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/
-#endif
}
}
else {
/*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/
}
}
-#if !defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
+#if !defined(XFree86Server)
XSync( b->xm_visual->display, False );
#endif
}
-/* $Id: xmesaP.h,v 1.22 2001/05/01 22:01:11 brianp Exp $ */
+/* $Id: xmesaP.h,v 1.23 2001/05/29 19:48:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
# include "GL/xf86glx.h"
# include "xf86glx_util.h"
#else
-# ifdef GLX_DIRECT_RENDERING
-# include "dri_mesa.h"
-# endif
# ifdef USE_XSHM
# include <X11/extensions/XShm.h>
# endif
#endif
#include "GL/xmesa.h"
#include "mtypes.h"
-#if defined(FX) && !defined(GLX_DIRECT_RENDERING)
+#if defined(FX)
#include "GL/fxmesa.h"
#include "FX/fxdrv.h"
#endif
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
-# include "xdriP.h"
-#else
-# define DRI_DRAWABLE_ARG
-# define DRI_DRAWABLE_PARM
-# define DRI_CTX_ARG
-#endif
-
-
extern _glthread_Mutex _xmesa_lock;
GLubyte clearcolor[4]; /* current clearing color */
unsigned long clearpixel; /* current clearing pixel value */
-
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- __DRIcontextPrivate *driContextPriv; /* back pointer to DRI context
- * used for locking
- */
- void *private; /* device-specific private context */
-#endif
};
unsigned long alloced_colors[256];
#endif
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- __DRIdrawablePrivate *driDrawPriv; /* back pointer to DRI drawable
- * used for direct access to framebuffer
- */
- void *private; /* device-specific private drawable */
-#endif
-
-#if defined( FX ) && !defined(GLX_DIRECT_RENDERING)
+#if defined( FX )
/* For 3Dfx Glide only */
GLboolean FXisHackUsable; /* Can we render into window? */
GLboolean FXwindowHack; /* Are we rendering into a window? */
extern XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v,
XMesaWindow w,
XMesaContext c
- DRI_DRAWABLE_ARG
);
/*