diff options
author | Roland Scheidegger <[email protected]> | 2007-07-18 18:07:12 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2007-07-19 17:59:31 +0200 |
commit | 6075df53b5435ddada989d776d989132def363a6 (patch) | |
tree | 61bb3521d9677d6b387e3ecfdb9465242466ecd9 /src/mesa/main/fbobject.c | |
parent | f9ac01eac511aa9ea0b8b48774022a08d0fc2f3b (diff) |
more fixes for mesa's fbo handling (fixes tests/fbotest1/2)
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 5345310ca1f..f300e481ce0 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1003,13 +1003,20 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) if (bindReadBuf) { _mesa_reference_framebuffer(&ctx->ReadBuffer, newFbread); + /* set context value */ + ctx->Pixel.ReadBuffer = newFbread->ColorReadBuffer; } if (bindDrawBuf) { + GLuint i; /* check if old FB had any texture attachments */ check_end_texture_render(ctx, ctx->DrawBuffer); /* check if time to delete this framebuffer */ _mesa_reference_framebuffer(&ctx->DrawBuffer, newFb); + /* set context value */ + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + ctx->Color.DrawBuffer[i] = newFb->ColorDrawBuffer[i]; + } if (newFb->Name != 0) { /* check if newly bound framebuffer has any texture attachments */ check_begin_texture_render(ctx, newFb); |