summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-09-11 15:04:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-09-11 15:04:23 +0000
commit02aa5fba0375a6013cc7cbaeb4883cc1263bbef4 (patch)
treebd9dd8873092f42088f568c0642f8a5296746ac8 /src
parent25847f2b5b50d9bbd58729e28e4a3032972e6c0c (diff)
init accum buffer fields in _mesa_update_framebuffer_visual()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/framebuffer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 612746adef..d0dbbbad02 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -427,7 +427,8 @@ _mesa_update_draw_buffer_bounds(GLcontext *ctx)
* etc. are satisfied by the fields of ctx->DrawBuffer->Visual. These can
* change depending on the renderbuffer bindings. This function updates
* the given framebuffer's Visual from the current renderbuffer bindings.
- * This is only intended for user-created framebuffers.
+ *
+ * This may apply to user-created framebuffers or window system framebuffers.
*
* Also note: ctx->DrawBuffer->Visual.depthBits might not equal
* ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer.DepthBits.
@@ -483,6 +484,18 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
= fb->Attachment[BUFFER_STENCIL].Renderbuffer->StencilBits;
}
+ if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) {
+ fb->Visual.haveAccumBuffer = GL_TRUE;
+ fb->Visual.accumRedBits
+ = fb->Attachment[BUFFER_DEPTH].Renderbuffer->RedBits;
+ fb->Visual.accumGreenBits
+ = fb->Attachment[BUFFER_DEPTH].Renderbuffer->GreenBits;
+ fb->Visual.accumBlueBits
+ = fb->Attachment[BUFFER_DEPTH].Renderbuffer->BlueBits;
+ fb->Visual.accumAlphaBits
+ = fb->Attachment[BUFFER_DEPTH].Renderbuffer->AlphaBits;
+ }
+
compute_depth_max(fb);
}