+/** Values for db_mode: */
+/*@{*/
+#define BACK_PIXMAP 1
+#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 */
+
+ XMesaBuffer Parent; /**< The XMesaBuffer this renderbuffer belongs to */
+ 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 */
+ GLint width1;
+ GLushort *origin2; /* used for PIXEL_ADDR2 macro */
+ GLint width2;
+ GLubyte *origin3; /* used for PIXEL_ADDR3 macro */
+ GLint width3;
+ GLuint *origin4; /* used for PIXEL_ADDR4 macro */
+ GLint width4;
+
+ GLint bottom; /* used for FLIP macro, equals height - 1 */
+
+ ClearFunc clearFunc;
+};
+
+
+/**
+ * Framebuffer information, derived from.
+ * Basically corresponds to a GLXDrawable.