From 62a2f8cdd60df797daad106d51c3bcc56943c236 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 16 Sep 2005 21:06:33 +0000 Subject: pass mask=NULL to write all pixels in clear_ci_buffer_with_masking() --- src/mesa/swrast/s_buffers.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c index 01e5a501a8..662a0282ce 100644 --- a/src/mesa/swrast/s_buffers.c +++ b/src/mesa/swrast/s_buffers.c @@ -28,7 +28,6 @@ #include "macros.h" #include "imports.h" #include "mtypes.h" -#include "fbobject.h" #include "s_accum.h" #include "s_context.h" @@ -80,21 +79,20 @@ clear_ci_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) const GLint y = ctx->DrawBuffer->_Ymin; const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; - GLuint span[MAX_WIDTH]; - GLubyte mask[MAX_WIDTH]; - GLint i, j; + GLint i; ASSERT(!ctx->Visual.rgbMode); + ASSERT(rb->PutRow); + ASSERT(rb->DataType == GL_UNSIGNED_INT); - MEMSET( mask, 1, width ); for (i = 0; i < height;i++) { + GLuint span[MAX_WIDTH]; + GLint j; for (j = 0; j < width;j++) { span[j] = ctx->Color.ClearIndex; } _swrast_mask_ci_array(ctx, rb, width, x, y + i, span); - ASSERT(rb->PutRow); - ASSERT(rb->DataType == GL_UNSIGNED_INT); - rb->PutRow(ctx, rb, width, x, y + i, span, mask); + rb->PutRow(ctx, rb, width, x, y + i, span, NULL); } } @@ -256,7 +254,8 @@ clear_color_buffers(GLcontext *ctx) /** * Called via the device driver's ctx->Driver.Clear() function if the * device driver can't clear one or more of the buffers itself. - * \param mask bitwise-OR of DD_*_BIT flags. + * \param mask bitfield of BUFER_BIT_* values indicating which renderbuffers + * are to be cleared. * \param all if GL_TRUE, clear whole buffer, else clear specified region. */ void -- cgit v1.2.3