diff options
author | Brian Paul <[email protected]> | 2005-09-26 00:38:00 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-26 00:38:00 +0000 |
commit | ad271b8c98021dc82c0714d768a6642aee10794f (patch) | |
tree | 87e567ed70ee9c4f7e558f6bef5868999d0664fb /src/mesa/drivers/x11/xmesaP.h | |
parent | 4aeaff2ae7f4a4b209e0d0ee2081b592951b7054 (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/x11/xmesaP.h')
-rw-r--r-- | src/mesa/drivers/x11/xmesaP.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 5f4e3d4cf29..efe88a00442 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: + * <drawable> is the X window + * For the back color buffer: + * Either <ximage> or <pixmap> will be used, never both. + * In any case, <drawable> always equals <pixmap>. + * For stand-alone Mesa, we could merge <drawable> and <pixmap> 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 */ |