-/* $Id: fakeglx.c,v 1.63 2002/04/19 00:47:07 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.64 2002/05/27 17:06:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
+/* PBUFFER */
static GLXFBConfig *
Fake_glXChooseFBConfig( Display *dpy, int screen,
const int *attribList, int *nitems )
}
+/* PBUFFER */
static int
Fake_glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
int attribute, int *value )
}
+/* PBUFFER */
static GLXFBConfig *
Fake_glXGetFBConfigs( Display *dpy, int screen, int *nelements )
{
+ /* Get list of all X visuals, create FBconfigs from them */
(void) dpy;
(void) screen;
- (void) nelements;
+ nelements = 0;
return 0;
}
+/* PBUFFER */
static XVisualInfo *
Fake_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config )
{
}
+/* PBUFFER */
static GLXWindow
Fake_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win,
const int *attribList )
}
+/* PBUFFER */
static GLXPbuffer
Fake_glXCreatePbuffer( Display *dpy, GLXFBConfig config,
const int *attribList )
}
+/* PBUFFER */
static void
Fake_glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf )
{
}
+/* PBUFFER */
static void
Fake_glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
unsigned int *value )
}
+/* PBUFFER */
static int
Fake_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value )
{
}
+/* PBUFFER */
static void
Fake_glXSelectEvent( Display *dpy, GLXDrawable drawable, unsigned long mask )
{
}
+/* PBUFFER */
static void
Fake_glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
unsigned long *mask )
static Bool
Fake_glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
{
- (void) dpy;
- (void) draw;
- (void) read;
- (void) ctx;
- return False;
+ return Fake_glXMakeContextCurrent( dpy, draw, read, ctx );
}
/* not used
-/* $Id: xm_api.c,v 1.35 2002/03/16 00:53:15 brianp Exp $ */
+/* $Id: xm_api.c,v 1.36 2002/05/27 17:06:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
* visinfo - desribes the visual to be used for XImages
* Return: true number of bits per pixel for XImages
*/
-#define GET_BITS_PER_PIXEL(xmv) bits_per_pixel(xmv)
-
#ifdef XFree86Server
static int bits_per_pixel( XMesaVisual xmv )
}
/* Save true bits/pixel */
- v->BitsPerPixel = GET_BITS_PER_PIXEL(v);
+ v->BitsPerPixel = bits_per_pixel(v);
assert(v->BitsPerPixel > 0);
}
b->xm_visual = v;
- b->pixmap_flag = GL_FALSE;
+ b->type = WINDOW;
b->display = v->display;
#ifdef XFree86Server
b->cmap = (ColormapPtr)LookupIDByType(wColormap(w), RT_COLORMAP);
assert(v);
b->xm_visual = v;
- b->pixmap_flag = GL_TRUE;
+ b->type = PIXMAP;
b->display = v->display;
b->cmap = cmap;
XMesaBuffer b, next;
for (b=XMesaBufferList; b; b=next) {
next = b->Next;
- if (b->display && b->frontbuffer && !b->pixmap_flag) {
+ if (b->display && b->frontbuffer && b->type == WINDOW) {
#ifdef XFree86Server
/* NOT_NEEDED */
#else
-/* $Id: xmesaP.h,v 1.27 2002/03/16 00:53:15 brianp Exp $ */
+/* $Id: xmesaP.h,v 1.28 2002/05/27 17:06:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
+typedef enum {
+ WINDOW, /* An X window */
+ GLXWINDOW, /* GLX window */
+ PIXMAP, /* GLX pixmap */
+ PBUFFER /* GLX Pbuffer */
+} BufferType;
+
+
/*
* "Derived" from GLframebuffer. Basically corresponds to a GLXDrawable.
*/
XMesaVisual xm_visual; /* the X/Mesa visual */
XMesaDisplay *display;
- GLboolean pixmap_flag; /* is the buffer a Pixmap? */
- GLboolean pbuffer_flag; /* is the buffer a Pbuffer? */
+ BufferType type; /* window, pixmap, pbuffer or glxwindow */
XMesaDrawable frontbuffer; /* either a window or pixmap */
XMesaPixmap backpixmap; /* back buffer Pixmap */
XMesaImage *backimage; /* back buffer simulated XImage */