if (masking) {
_swrast_mask_rgba_array(ctx, rb, width, xpos, ypos + i, rgba);
}
-#if OLD_RENDERBUFFER
- if (swrast->Driver.WriteRGBASpan)
- swrast->Driver.WriteRGBASpan(ctx, rb, width, xpos, ypos + i,
- (const GLchan (*)[4]) rgba, NULL);
- else
-#endif
- rb->PutRow(ctx, rb, width, xpos, ypos + i, rgba, NULL);
+ rb->PutRow(ctx, rb, width, xpos, ypos + i, rgba, NULL);
}
}
}
_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];
ASSERT(span->end <= MAX_WIDTH);
/* Read span of current frame buffer pixels */
if (span->arrayMask & SPAN_XY) {
/* array of x/y pixel coords */
-#if OLD_RENDERBUFFER
- if (swrast->Driver.ReadRGBAPixels)
- (*swrast->Driver.ReadRGBAPixels)( ctx, rb, 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);
+ rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y,
+ framebuffer);
}
else {
/* horizontal run of pixels */
* Mesa 3-D graphics library
* 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"),
copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint width, GLint height, GLint destx, GLint desty)
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *drawRb = NULL;
GLboolean quick_draw;
GLint row;
dy = desty + row;
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
-#if OLD_RENDERBUFFER
- if (swrast->Driver.WriteRGBASpan)
- swrast->Driver.WriteRGBASpan(ctx, drawRb, width, destx, dy,
- (const GLchan (*)[4]) span.array->rgba, NULL);
- else
-#endif
- drawRb->PutRow(ctx, drawRb, width, destx, dy,
- span.array->rgba, NULL);
+ drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
}
else if (zoom) {
span.x = destx;
copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint width, GLint height, GLint destx, GLint desty)
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *drawRb;
GLchan *tmpImage,*p;
GLboolean quick_draw;
/* Write color span */
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
-#if OLD_RENDERBUFFER
- if (swrast->Driver.WriteRGBASpan)
- swrast->Driver.WriteRGBASpan(ctx, drawRb, width, destx, dy,
- (const GLchan (*)[4])span.array->rgba, NULL);
- else
-#endif
- drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
-
+ drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
}
else if (zoom) {
span.x = destx;
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels )
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *rb = NULL; /* only used for quickDraw path */
const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0;
const GLint desty = y;
/* draw the span */
if (quickDraw) {
-#if OLD_RENDERBUFFER
- if (swrast->Driver.WriteRGBASpan)
- swrast->Driver.WriteRGBASpan(ctx, rb, span.end, span.x, span.y,
- (CONST GLchan (*)[4]) span.array->rgba, NULL);
- else
-#endif
- rb->PutRow(ctx, rb, span.end, span.x, span.y,
+ rb->PutRow(ctx, rb, span.end, span.x, span.y,
span.array->rgba, NULL);
}
else if (zoom) {
GLuint dest[MAX_WIDTH];
ASSERT(span->end < MAX_WIDTH);
+ ASSERT(rb->DataType == GL_UNSIGNED_INT);
/* Read dest values from frame buffer */
if (span->arrayMask & SPAN_XY) {
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest);
}
else {
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
rb->GetRow(ctx, rb, span->end, span->x, span->y, dest);
}
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
const struct sw_span *span, GLchan rgba[][4])
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan dest[MAX_WIDTH][4];
ASSERT(span->end < MAX_WIDTH);
ASSERT(span->arrayMask & SPAN_RGBA);
+ ASSERT(rb->DataType == GL_UNSIGNED_INT);
if (span->arrayMask & SPAN_XY) {
- swrast->Driver.ReadRGBAPixels(ctx, rb, span->end,
- span->array->x, span->array->y,
- dest, span->array->mask);
+ rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest);
}
else {
_swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y, dest);
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
const struct sw_span *span, GLchan rgba[][4])
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan dest[MAX_WIDTH][4];
#if CHAN_BITS == 8
GLuint srcMask = *((GLuint*)ctx->Color.ColorMask);
ASSERT(span->arrayMask & SPAN_RGBA);
if (span->arrayMask & SPAN_XY) {
-#if OLD_RENDERBUFFER
- if (swrast->Driver.ReadRGBAPixels)
- swrast->Driver.ReadRGBAPixels(ctx, rb, n, span->array->x, span->array->y,
- dest, span->array->mask);
- else
-#endif
- rb->GetValues(ctx, rb, n, span->array->x, span->array->y, dest);
+ rb->GetValues(ctx, rb, n, span->array->x, span->array->y, dest);
}
else {
_swrast_read_rgba_span(ctx, rb, n, span->x, span->y, dest);
#define T_SCALE theight
#define SETUP_CODE \
- SWcontext *swrast = SWRAST_CONTEXT(ctx); \
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
const GLint b = obj->BaseLevel; \
span.intTex[0] += span.intTexStep[0]; \
span.intTex[1] += span.intTexStep[1]; \
} \
- if (swrast->Driver.WriteRGBSpan) \
- swrast->Driver.WriteRGBSpan(ctx, rb, span.end, span.x, span.y, \
- (CONST GLchan (*)[3]) span.array->rgb,\
- NULL ); \
- else \
- rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
+ rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
#include "s_tritemp.h"
#define T_SCALE theight
#define SETUP_CODE \
- SWcontext *swrast = SWRAST_CONTEXT(ctx); \
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
const GLint b = obj->BaseLevel; \
span.intTex[1] += span.intTexStep[1]; \
span.z += span.zStep; \
} \
- if (swrast->Driver.WriteRGBSpan) \
- swrast->Driver.WriteRGBSpan(ctx, rb, span.end, span.x, span.y, \
- (CONST GLchan (*)[3]) span.array->rgb,\
- span.array->mask ); \
- else \
- rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
+ rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
#include "s_tritemp.h"