aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-07-09 01:22:50 +0000
committerBrian Paul <[email protected]>2002-07-09 01:22:50 +0000
commit3b4fbbc129c711a5aec8d653d5c6eb2e195f947c (patch)
treeececa2d3a08ab45afd2068d9cabf5609a0c374d1 /src/mesa/swrast/s_readpix.c
parentb4338e58879a4f2eabf8af09f9dfa7adf6e9f9f2 (diff)
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.
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index a52cd8e7c0b..f925e791162 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);
}