summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_blend.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
committerBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
commite4b2356c07d31fbeeabb13b2fb47db703b473080 (patch)
treed8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/swrast/s_blend.c
parentebef61f5c0950572f9c6a81b08f447957461675c (diff)
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/swrast/s_blend.c')
-rw-r--r--src/mesa/swrast/s_blend.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index 1001d6f2124..f15c95710dc 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.0
+ * Version: 6.3
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -37,7 +37,6 @@
#include "colormac.h"
#include "macros.h"
-#include "s_alphabuf.h"
#include "s_blend.h"
#include "s_context.h"
#include "s_span.h"
@@ -847,8 +846,8 @@ void _swrast_choose_blend_func( GLcontext *ctx )
* pixel coordinates.
*/
void
-_swrast_blend_span( GLcontext *ctx, const struct sw_span *span,
- GLchan rgba[][4] )
+_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+ const struct sw_span *span, GLchan rgba[][4])
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan framebuffer[MAX_WIDTH][4];
@@ -860,19 +859,20 @@ _swrast_blend_span( GLcontext *ctx, const struct sw_span *span,
/* Read span of current frame buffer pixels */
if (span->arrayMask & SPAN_XY) {
/* array of x/y pixel coords */
- (*swrast->Driver.ReadRGBAPixels)( ctx, span->end,
+#if OLD_RENDERBUFFER
+ if (swrast->Driver.ReadRGBAPixels)
+ (*swrast->Driver.ReadRGBAPixels)( ctx, rb, span->end,
span->array->x, span->array->y,
framebuffer, span->array->mask );
- if (swrast->_RasterMask & ALPHABUF_BIT) {
- _swrast_read_alpha_pixels( ctx, span->end,
- span->array->x, span->array->y,
- framebuffer, span->array->mask );
- }
+ else
+#endif
+ rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y,
+ framebuffer);
}
else {
/* horizontal run of pixels */
- _swrast_read_rgba_span( ctx, ctx->DrawBuffer, span->end,
- span->x, span->y, framebuffer );
+ _swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y,
+ framebuffer);
}
SWRAST_CONTEXT(ctx)->BlendFunc( ctx, span->end, span->array->mask, rgba,