summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-10-19 18:14:58 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-10-19 18:14:58 +0000
commit82960fbf6963bd4930467650cf5e084005a7737a (patch)
treebc155467bf833970791199f40ea2ed0249995907
parentb0c8df81ab32aaae4f9bb2d7aa85fc685a6c9bf4 (diff)
call Driver.SetReadBuffer() in clear_color_buffers() to fix colormasked clear bug
-rw-r--r--src/mesa/main/buffers.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 5893b907bf..fcabe9d3e5 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,4 +1,4 @@
-/* $Id: buffers.c,v 1.9.4.1 2000/10/17 00:24:11 brianp Exp $ */
+/* $Id: buffers.c,v 1.9.4.2 2000/10/19 18:14:58 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -209,15 +209,19 @@ clear_color_buffers(GLcontext *ctx)
if (bufferBit & ctx->Color.DrawDestMask) {
if (bufferBit == FRONT_LEFT_BIT) {
(void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_FRONT_LEFT);
+ (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_FRONT_LEFT);
}
else if (bufferBit == FRONT_RIGHT_BIT) {
(void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_FRONT_RIGHT);
+ (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_FRONT_RIGHT);
}
else if (bufferBit == BACK_LEFT_BIT) {
(void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_BACK_LEFT);
+ (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_BACK_LEFT);
}
else {
(void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_BACK_RIGHT);
+ (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_BACK_RIGHT);
}
if (ctx->Color.SWmasking) {
@@ -229,8 +233,9 @@ clear_color_buffers(GLcontext *ctx)
}
}
- /* restore default dest buffer */
+ /* restore default read/draw buffers */
(void) (*ctx->Driver.SetDrawBuffer)( ctx, ctx->Color.DriverDrawBuffer );
+ (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer, ctx->Pixel.DriverReadBuffer );
}