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/swrast/s_readpix.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/mesa/swrast/s_readpix.c') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index a52cd8e7c0..f925e79116 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.14 2002/04/19 00:38:27 brianp Exp $ */ +/* $Id: s_readpix.c,v 1.15 2002/07/09 01:22:52 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -62,9 +62,7 @@ read_index_pixels( GLcontext *ctx, return; } - ASSERT(swrast->Driver.SetReadBuffer); - (*swrast->Driver.SetReadBuffer)(ctx, ctx->ReadBuffer, - ctx->Pixel.DriverReadBuffer); + _swrast_use_read_buffer(ctx); readWidth = (width > MAX_WIDTH) ? MAX_WIDTH : width; @@ -82,8 +80,7 @@ read_index_pixels( GLcontext *ctx, &ctx->Pack, ctx->_ImageTransferState); } - (*swrast->Driver.SetReadBuffer)(ctx, ctx->DrawBuffer, - ctx->Color.DriverDrawBuffer); + _swrast_use_draw_buffer(ctx); } @@ -318,13 +315,13 @@ read_rgba_pixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); GLint readWidth; - (*swrast->Driver.SetReadBuffer)(ctx, ctx->ReadBuffer, ctx->Pixel.DriverReadBuffer); + _swrast_use_read_buffer(ctx); /* Try optimized path first */ if (read_fast_rgba_pixels( ctx, x, y, width, height, format, type, pixels, packing )) { - (*swrast->Driver.SetReadBuffer)(ctx, ctx->DrawBuffer, ctx->Color.DriverDrawBuffer); + _swrast_use_draw_buffer(ctx); return; /* done! */ } @@ -470,7 +467,7 @@ read_rgba_pixels( GLcontext *ctx, } } - (*swrast->Driver.SetReadBuffer)(ctx, ctx->DrawBuffer, ctx->Color.DriverDrawBuffer); + _swrast_use_draw_buffer(ctx); } -- cgit v1.2.3