#ifndef DRIRENDERBUFFER_H
#define DRIRENDERBUFFER_H
-#include "mtypes.h"
+#include "main/mtypes.h"
+#include "dri_util.h"
+
typedef struct {
struct gl_renderbuffer Base;
*/
GLint flippedOffset;
GLint flippedPitch;
- GLubyte *flippedData; /* mmap'd memory, if used */
+ GLvoid *flippedData; /* mmap'd address of buffer memory, if used */
+
+ /* Pointer to corresponding __DRIdrawablePrivate. This is used to compute
+ * the window's position within the framebuffer.
+ */
+ __DRIdrawablePrivate *dPriv;
/* XXX this is for radeon/r200 only. We should really create a new
* r200Renderbuffer class, derived from this class... not a huge deal.
*/
GLboolean depthHasSurface;
- /* XXX this is for s3v only. A handy flag to know if this is the back
- * color buffer.
+ /**
+ * A handy flag to know if this is the back color buffer.
+ *
+ * \note
+ * This is currently only used by s3v and tdfx.
*/
GLboolean backBuffer;
} driRenderbuffer;
extern driRenderbuffer *
-driNewRenderbuffer(GLenum format, GLint cpp, GLint offset, GLint pitch);
+driNewRenderbuffer(GLenum format, GLvoid *addr,
+ GLint cpp, GLint offset, GLint pitch,
+ __DRIdrawablePrivate *dPriv);
extern void
driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped);
+
+extern void
+driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv);
+
+
#endif /* DRIRENDERBUFFER_H */