I've merged in my changes to cvs that allows Mesa to works both standalone and inside of XFree86 4.0 with SGI's GLX core, which SGI released last week. The code has been tested and works in both cases. We (Precision Insight) are working with XFree86 and SGI on integrating GLX and rendering core (i.e., Mesa). We hope to release the patches to XFree86 soon, so that others can test the integrated indirect rendering support. Most of the changes were to resolve the names in src/X, and will affect those that work on xmesa?.[ch]. The main changes were to rename several functions, add typedefs and create macros to make the code work both inside and outside of the X server (and to minimize the number of #ifdef's in the code). I've summarized the change below. See xmesa_x.h and xmesa_xf86.h for more details (in include/GL). - Added tyepdefs for the standard structures used in xmesa?.c (e.g., Display, Pixmap, Colormap, etc. becomes XMesaDisplay, XMesaPixmap, XMesaColormap, etc.). - Added macros for the standard Xlib calls used in xmesa?.c (e.g., XPutPixel becomes XMesaPutPixel). - Added macros for retrieving information from the visual (e.g., instead of v->visinfo->red_mask for standalone Mesa and v->visinfo->redMask inside of the X server, there is now a v->visinfo->GET_REDMASK(v) macro). These changes were required because most of the structures that Xlib programmers use (e.g., GC, Drawable, Window, Pixmap, ...) have different structures inside of the X server (see xmesa?.[ch] for details of how they are used). For user programs that use standalone Mesa, no changes to their programs are required, and these programs should continue to use GC, Display, Pixmap, etc. I also changed struct xmesa_buffer (to add a back pointer to the context to which the buffer is currently bound, see xmesaP.h and xmesa1.c for details), and added the following non-visible functions to xmesa1.c to support SGI's GLX (see xmesa1.c for details): - XMesaSetVisualDisplay - XMesaForceCurrent - XMesaLoseCurrent - XMesaReset Cheers, Kevin