From 8e1c3bd0b4c599bae5b64cd51cec1d74266f30fb Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 18:01:31 -0600 Subject: Implement alpha buffer copy for SwapBuffers(). Nicolai writes: When the pixmap pixel format has no alpha channel, the x11 driver (software rendering) adds a wrapped alpha channel on request. During SwapBuffers, this alpha channel is not copied from back to front, which means that the front buffer doesn't really contain the contents that the back buffer previously contained. A subsequent glReadPixels from the front buffer will return an incorrect result. The following patch attempts to fix this. --- src/mesa/main/renderbuffer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/main/renderbuffer.h') diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h index e1a0a559792..e5f1147b4a6 100644 --- a/src/mesa/main/renderbuffer.h +++ b/src/mesa/main/renderbuffer.h @@ -64,6 +64,9 @@ _mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight); +extern void +_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb); + extern GLboolean _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, GLuint depthBits); -- cgit v1.2.3