diff options
author | Brian Paul <[email protected]> | 2000-10-19 18:17:19 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-10-19 18:17:19 +0000 |
commit | 9f0bb59c53f1413531ca679e7d3516bf8d30cae3 (patch) | |
tree | aaba43c945d319e60e210c4b0ae741b0862280cb /src/mesa/main/buffers.c | |
parent | cc50ed60b374e126a85919f20a3c3a033e558aca (diff) |
call Driver.SetReadBuffer() in clear_color_buffers() to fix colormasked clear bug
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r-- | src/mesa/main/buffers.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 7db265dff1b..a928adc6126 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -1,4 +1,4 @@ -/* $Id: buffers.c,v 1.13 2000/10/17 00:42:02 brianp Exp $ */ +/* $Id: buffers.c,v 1.14 2000/10/19 18:17:19 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -211,15 +211,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 (colorMask != 0xffffffff) { @@ -231,8 +235,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 ); } |