From ad271b8c98021dc82c0714d768a6642aee10794f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 26 Sep 2005 00:38:00 +0000 Subject: Added XMesaDrawable to xmesa_renderbuffer. Use it in a few places instead of the XMesaPixmap field to avoid some X server-side issues with casting. --- src/mesa/drivers/x11/xmesaP.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/x11/xmesaP.h') diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 5f4e3d4cf2..efe88a0044 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -161,13 +161,23 @@ typedef enum { #define BACK_XIMAGE 2 +/** + * An xmesa_renderbuffer represents the back or front color buffer. + * For the front color buffer: + * is the X window + * For the back color buffer: + * Either or will be used, never both. + * In any case, always equals . + * For stand-alone Mesa, we could merge and into one + * field. We don't do that for the server-side GLcore module because + * pixmaps and drawables are different and we'd need a bunch of casts. + */ struct xmesa_renderbuffer { struct gl_renderbuffer Base; /* Base class */ - XMesaDrawable pixmap; /* Either an X Window ID (front color buf) */ - /* or X Pixmap ID (back color buf) */ - + XMesaDrawable drawable; /* Usually the X window ID */ + XMesaPixmap pixmap; /* Back color buffer */ XMesaImage *ximage; /* The back buffer, if not using a Pixmap */ GLubyte *origin1; /* used for PIXEL_ADDR1 macro */ -- cgit v1.2.3