shmctl( b->shminfo.shmid, IPC_RMID, 0 ); /* nobody else needs it */
/* Finally, try an XShmPutImage to be really sure the extension works */
- gc = XCreateGC( b->xm_visual->display, b->frontxrb->pixmap, 0, NULL );
- XShmPutImage( b->xm_visual->display, b->frontxrb->pixmap, gc,
+ gc = XCreateGC( b->xm_visual->display, b->frontxrb->drawable, 0, NULL );
+ XShmPutImage( b->xm_visual->display, b->frontxrb->drawable, gc,
b->backxrb->ximage, 0, 0, 0, 0, 1, 1 /*one pixel*/, False );
XSync( b->xm_visual->display, False );
XFreeGC( b->xm_visual->display, gc );
+
/*
* Setup an off-screen pixmap or Ximage to use as the back buffer.
* Input: b - the X/Mesa buffer
XMesaDestroyImage( b->backxrb->ximage );
b->backxrb->ximage = NULL;
}
+ /* this call just updates the width/origin fields in the xrb */
+ b->backxrb->Base.AllocStorage(NULL, &b->backxrb->Base,
+ b->backxrb->Base.InternalFormat,
+ b->backxrb->ximage->width,
+ b->backxrb->ximage->height);
}
b->backxrb->pixmap = None;
}
}
/* Allocate new back pixmap */
b->backxrb->pixmap = XMesaCreatePixmap( b->xm_visual->display,
- b->frontxrb->pixmap,
+ b->frontxrb->drawable,
width, height,
GET_VISUAL_DEPTH(b->xm_visual) );
b->backxrb->ximage = NULL;
if (b && window) {
/* Do window-specific initializations */
- b->frontxrb->pixmap = window;
+ b->frontxrb->drawable = window;
+ b->frontxrb->pixmap = (XMesaPixmap) window;
/* Setup for single/double buffering */
if (v->mesa_visual.doubleBufferMode) {
XMesaPutPixel(v->hpcr_clear_ximage, i, 0, 0);
XMesaPutPixel(v->hpcr_clear_ximage, i, 1, 0);
}
- XMesaPutImage(b->display, (XMesaDrawable)v->hpcr_clear_pixmap,
+ XMesaPutImage(b->display, (XMesaDrawable) v->hpcr_clear_pixmap,
b->cleargc, v->hpcr_clear_ximage, 0, 0, 0, 0, 16, 2);
XMesaSetFillStyle( v->display, b->cleargc, FillTiled);
XMesaSetTile( v->display, b->cleargc, v->hpcr_clear_pixmap );
}
if (!initialize_visual_and_buffer( client, v, b, v->mesa_visual.rgbMode,
- (XMesaDrawable)w, cmap )) {
+ (XMesaDrawable) w, cmap )) {
free_xmesa_buffer(client, b);
return NULL;
}
#endif
if (!initialize_visual_and_buffer(client, v, b, v->mesa_visual.rgbMode,
- (XMesaDrawable)p, cmap)) {
+ (XMesaDrawable) p, cmap)) {
free_xmesa_buffer(client, b);
return NULL;
}
int client = 0;
#ifdef XFree86Server
- if (b->frontxrb->pixmap)
- client = CLIENT_ID(b->frontxrb->pixmap->id);
+ if (b->frontxrb->drawable)
+ client = CLIENT_ID(b->frontxrb->drawable->id);
#endif
if (b->gc) XMesaFreeGC( b->xm_visual->display, b->gc );
if (b->xm_visual->mesa_visual.doubleBufferMode)
{
- if (b->backxrb->ximage) {
+ if (b->backxrb->ximage) {
#if defined(USE_XSHM) && !defined(XFree86Server)
- if (b->shm) {
- XShmDetach( b->xm_visual->display, &b->shminfo );
- XDestroyImage( b->backxrb->ximage );
- shmdt( b->shminfo.shmaddr );
- }
- else
+ if (b->shm) {
+ XShmDetach( b->xm_visual->display, &b->shminfo );
+ XDestroyImage( b->backxrb->ximage );
+ shmdt( b->shminfo.shmaddr );
+ }
+ else
#endif
- XMesaDestroyImage( b->backxrb->ximage );
- }
- if (b->backxrb->pixmap) {
- XMesaFreePixmap( b->xm_visual->display, b->backxrb->pixmap );
- if (b->xm_visual->hpcr_clear_flag) {
- XMesaFreePixmap( b->xm_visual->display,
- b->xm_visual->hpcr_clear_pixmap );
- XMesaDestroyImage( b->xm_visual->hpcr_clear_ximage );
- }
- }
+ XMesaDestroyImage( b->backxrb->ximage );
+ }
+ if (b->backxrb->pixmap) {
+ XMesaFreePixmap( b->xm_visual->display, b->backxrb->pixmap );
+ if (b->xm_visual->hpcr_clear_flag) {
+ XMesaFreePixmap( b->xm_visual->display,
+ b->xm_visual->hpcr_clear_pixmap );
+ XMesaDestroyImage( b->xm_visual->hpcr_clear_ximage );
+ }
+ }
}
if (b->rowimage) {
_mesa_free( b->rowimage->data );
#if defined(USE_XSHM) && !defined(XFree86Server)
if (b->shm) {
/*_glthread_LOCK_MUTEX(_xmesa_lock);*/
- XShmPutImage( b->xm_visual->display, b->frontxrb->pixmap,
+ XShmPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, 0, 0,
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height,
#endif
{
/*_glthread_LOCK_MUTEX(_xmesa_lock);*/
- XMesaPutImage( b->xm_visual->display, b->frontxrb->pixmap,
+ XMesaPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, 0, 0,
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height );
/*_glthread_LOCK_MUTEX(_xmesa_lock);*/
XMesaCopyArea( b->xm_visual->display,
b->backxrb->pixmap, /* source drawable */
- b->frontxrb->pixmap, /* dest. drawable */
+ b->frontxrb->drawable, /* dest. drawable */
b->swapgc,
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height,
0, 0 /* dest region */
#if defined(USE_XSHM) && !defined(XFree86Server)
if (b->shm) {
/* XXX assuming width and height aren't too large! */
- XShmPutImage( b->xm_visual->display, b->frontxrb->pixmap,
+ XShmPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, x, yTop,
x, yTop, width, height, False );
#endif
{
/* XXX assuming width and height aren't too large! */
- XMesaPutImage( b->xm_visual->display, b->frontxrb->pixmap,
+ XMesaPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, x, yTop,
x, yTop, width, height );
/* Copy pixmap to window on server */
XMesaCopyArea( b->xm_visual->display,
b->backxrb->pixmap, /* source drawable */
- b->frontxrb->pixmap, /* dest. drawable */
+ b->frontxrb->drawable, /* dest. drawable */
b->swapgc,
x, yTop, width, height, /* source region */
x, yTop /* dest region */
* Return: GL_TRUE = context is double buffered
* GL_FALSE = context is single buffered
*/
+#ifndef XFree86Server
GLboolean XMesaGetBackBuffer( XMesaBuffer b,
XMesaPixmap *pixmap,
XMesaImage **ximage )
return GL_FALSE;
}
}
+#endif /* XFree86Server */
/*
{
XMesaBuffer b;
for (b=XMesaBufferList; b; b=b->Next) {
- if (b->frontxrb->pixmap==d && b->display==dpy) {
+ if (b->frontxrb->drawable == d && b->display == dpy) {
return b;
}
}
XMesaBuffer b, next;
for (b=XMesaBufferList; b; b=next) {
next = b->Next;
- if (b->display && b->frontxrb->pixmap && b->type == WINDOW) {
+ if (b->display && b->frontxrb->drawable && b->type == WINDOW) {
#ifdef XFree86Server
/* NOT_NEEDED */
#else
XSync(b->display, False);
- if (!window_exists( b->display, b->frontxrb->pixmap )) {
+ if (!window_exists( b->display, b->frontxrb->drawable )) {
/* found a dead window, free the ancillary info */
XMesaDestroyBuffer( b );
}
void XMesaResizeBuffers( XMesaBuffer b )
{
#ifdef XFree86Server
+ GLuint winwidth, winheight;
GET_CURRENT_CONTEXT(ctx);
- xmesa_resize_buffers(ctx, &(b->mesa_buffer), 0, 0);
+
+ winwidth = MIN2(b->frontxrb->drawable->width, MAX_WIDTH);
+ winheight = MIN2(b->frontxrb->drawable->height, MAX_HEIGHT);
+
+ xmesa_resize_buffers(ctx, &(b->mesa_buffer), winwidth, winheight);
#else
Window root;
int xpos, ypos;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = XMESA_BUFFER(ctx->DrawBuffer)->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
y = YFLIP(xrb, y);
if (mask) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
y = YFLIP(xrb, y);
if (mask) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
XDITHER_SETUP(y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
XDITHER_SETUP(y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
SETUP_1BIT;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
SETUP_1BIT;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
LOOKUP_SETUP;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
LOOKUP_SETUP;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
DITHER_SETUP;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
SETUP_1BIT;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
LOOKUP_SETUP;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
const unsigned long pixel = xmesa_color_to_pixel(ctx, color[RCOMP],
color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat);
XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
XMesaSetForeground( xmesa->display, gc, colorIndex );
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
const unsigned long pixel = xmesa_color_to_pixel(ctx, color[RCOMP],
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
XMesaSetForeground( xmesa->display, gc, colorIndex );
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
y = YFLIP(xrb, y);
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb;
XMesaDisplay *dpy = xmesa->xm_visual->display;
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc;
register GLuint i;
for (i=0;i<n;i++) {
XMesaDestroyImage( span );
}
#else
- (*xmesa->display->GetImage)(xrb->pixmap,
+ (*xmesa->display->GetImage)(xrb->drawable,
x, y, n, 1, ZPixmap,
~0L, (pointer)index);
#endif
span = XMesaCreateImage(xmesa->xm_visual->BitsPerPixel, n, 1, NULL);
span->data = (char *)MALLOC(span->height * span->bytes_per_line);
error = (!span->data);
- (*xmesa->display->GetImage)(xrb->pixmap,
+ (*xmesa->display->GetImage)(xrb->drawable,
x, YFLIP(xrb, y), n, 1, ZPixmap,
~0L, (pointer)span->data);
#else
GLuint i;
if (xrb->pixmap) {
for (i=0;i<n;i++) {
- indx[i] = (GLuint) read_pixel( xmesa->display, xrb->pixmap,
+ indx[i] = (GLuint) read_pixel( xmesa->display, xrb->drawable,
x[i], YFLIP(xrb, y[i]) );
}
}
register GLuint i;
if (xrb->pixmap) {
- XMesaDrawable buffer = xrb->pixmap;
+ XMesaDrawable buffer = xrb->drawable;
switch (xmesa->pixelformat) {
case PF_Truecolor:
case PF_Dither_True: