From 3b4fbbc129c711a5aec8d653d5c6eb2e195f947c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Jul 2002 01:22:50 +0000 Subject: Overhaul of glRead/DrawBuffer() code. Now, swrast->Driver.SetBuffer() indicates the read AND draw color buffer for all software rasterization. Lots of related clean-ups. See RELNOTES-4.1 for details. --- src/mesa/drivers/dos/dmesa.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/mesa/drivers/dos/dmesa.c') diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c index c9bc898dcb..5855f04f3e 100644 --- a/src/mesa/drivers/dos/dmesa.c +++ b/src/mesa/drivers/dos/dmesa.c @@ -512,8 +512,7 @@ static void clear (GLcontext *ctx, GLbitfield mask, GLboolean all, /* * Set the current reading buffer. */ -static void set_read_buffer (GLcontext *ctx, GLframebuffer *buffer, - GLenum mode) +static void set_buffer (GLcontext *ctx, GLframebuffer *buffer, GLenum mode) { /* DMesaContext c = (DMesaContext)ctx->DriverCtx; @@ -523,18 +522,6 @@ static void set_read_buffer (GLcontext *ctx, GLframebuffer *buffer, -/* - * Set the destination/draw buffer. - */ -static void set_draw_buffer (GLcontext *ctx, GLenum mode) -{ - /* - XXX this has to be fixed - */ -} - - - /* * Return the width and height of the current buffer. * If anything special has to been done when the buffer/window is @@ -640,6 +627,7 @@ void dmesa_init_pointers (GLcontext *ctx) ctx->Driver.CopyPixels = _swrast_CopyPixels; ctx->Driver.DrawPixels = _swrast_DrawPixels; ctx->Driver.ReadPixels = _swrast_ReadPixels; + ctx->Driver.DrawBuffer = _swrast_DrawBuffer; /* Software texture functions: */ @@ -671,7 +659,6 @@ void dmesa_init_pointers (GLcontext *ctx) /* Statechange callbacks: */ - ctx->Driver.SetDrawBuffer = set_draw_buffer; ctx->Driver.ClearColor = clear_color; /* Initialize the TNL driver interface: @@ -699,7 +686,7 @@ static void dmesa_update_state (GLcontext *ctx, GLuint new_state) _ac_InvalidateState(ctx, new_state); _tnl_InvalidateState(ctx, new_state); - swdd->SetReadBuffer = set_read_buffer; + swdd->SetBuffer = set_buffer; /* RGB(A) span/pixel functions */ swdd->WriteRGBASpan = write_rgba_span; -- cgit v1.2.3