/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.2
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
"GLX_SGI_video_sync " \
"GLX_SGIX_fbconfig " \
"GLX_SGIX_pbuffer "
-/*
- "GLX_ARB_render_texture"
-*/
-
/*
* Our fake GLX context will contain a "real" GLX context and an XMesa context.
/*
* Test if the given XVisualInfo is usable for Mesa rendering.
*/
-static GLboolean is_usable_visual( XVisualInfo *vinfo )
+static GLboolean
+is_usable_visual( XVisualInfo *vinfo )
{
switch (vinfo->CLASS) {
case StaticGray:
* >0 = overlay planes
* <0 = underlay planes
*/
-static int level_of_visual( Display *dpy, XVisualInfo *vinfo )
+static int
+level_of_visual( Display *dpy, XVisualInfo *vinfo )
{
Atom overlayVisualsAtom;
OverlayInfo *overlay_info = NULL;
/* add xmvis to the list */
VisualTable[NumVisuals] = xmvis;
NumVisuals++;
- /* XXX minor hack */
+ /* XXX minor hack, because XMesaCreateVisual doesn't support an
+ * aux buffers parameter.
+ */
xmvis->mesa_visual.numAuxBuffers = numAuxBuffers;
}
return xmvis;
* Input: glxvis - the glx_visual
* Return: a pixel value or -1 if no transparent pixel
*/
-static int transparent_pixel( XMesaVisual glxvis )
+static int
+transparent_pixel( XMesaVisual glxvis )
{
Display *dpy = glxvis->display;
XVisualInfo *vinfo = glxvis->visinfo;
/*
* Try to get an X visual which matches the given arguments.
*/
-static XVisualInfo *get_visual( Display *dpy, int scr,
- unsigned int depth, int xclass )
+static XVisualInfo *
+get_visual( Display *dpy, int scr, unsigned int depth, int xclass )
{
XVisualInfo temp, *vis;
long mask;
* varname - the name of the environment variable
* Return: an XVisualInfo pointer to NULL if error.
*/
-static XVisualInfo *get_env_visual(Display *dpy, int scr, const char *varname)
+static XVisualInfo *
+get_env_visual(Display *dpy, int scr, const char *varname)
{
char value[100], type[100];
int depth, xclass = -1;
* preferred_class - preferred GLX visual class or DONT_CARE
* Return: pointer to an XVisualInfo or NULL.
*/
-static XVisualInfo *choose_x_visual( Display *dpy, int screen,
- GLboolean rgba, int min_depth,
- int preferred_class )
+static XVisualInfo *
+choose_x_visual( Display *dpy, int screen, GLboolean rgba, int min_depth,
+ int preferred_class )
{
XVisualInfo *vis;
int xclass, visclass = 0;
* preferred_class - preferred GLX visual class or DONT_CARE
* Return: pointer to an XVisualInfo or NULL.
*/
-static XVisualInfo *choose_x_overlay_visual( Display *dpy, int scr,
- GLboolean rgbFlag,
- int level, int trans_type,
- int trans_value,
- int min_depth,
- int preferred_class )
+static XVisualInfo *
+choose_x_overlay_visual( Display *dpy, int scr, GLboolean rgbFlag,
+ int level, int trans_type, int trans_value,
+ int min_depth, int preferred_class )
{
Atom overlayVisualsAtom;
OverlayInfo *overlay_info;
/**********************************************************************/
-static XMesaVisual choose_visual( Display *dpy, int screen, const int *list,
- GLboolean rgbModeDefault )
+static XMesaVisual
+choose_visual( Display *dpy, int screen, const int *list,
+ GLboolean rgbModeDefault )
{
const int *parselist;
XVisualInfo *vis;
}
-
static Bool
Fake_glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx )
{
}
-
static GLXPixmap
Fake_glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap )
{
}
-
static void
Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
unsigned long mask )
}
-
static Bool
Fake_glXQueryExtension( Display *dpy, int *errorb, int *event )
{
}
-
static Bool
Fake_glXIsDirect( Display *dpy, GLXContext ctx )
{
}
-
static Bool
Fake_glXQueryVersion( Display *dpy, int *maj, int *min )
{
}
-
/*
* Query the GLX attributes of the given XVisualInfo.
*/
}
-
+/* silence warning */
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
-struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
+
+
+/**
+ * Create a new GLX API dispatch table with its function pointers
+ * initialized to point to Mesa's "fake" GLX API functions.
+ * Note: there's a similar function (_real_GetGLXDispatchTable) that
+ * returns a new dispatch table with all pointers initalized to point
+ * to "real" GLX functions (which understand GLX wire protocol, etc).
+ */
+struct _glxapi_table *
+_mesa_GetGLXDispatchTable(void)
{
static struct _glxapi_table glx;