-/* $Id: colortab.c,v 1.27 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: colortab.c,v 1.28 2000/11/21 23:01:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
width = MAX_WIDTH;
/* read the data from framebuffer */
+ RENDER_START(ctx);
gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
+ RENDER_FINISH(ctx);
/* Restore reading from draw buffer (the default) */
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
width = MAX_WIDTH;
/* read the data from framebuffer */
+ RENDER_START(ctx);
gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
+ RENDER_FINISH(ctx);
/* Restore reading from draw buffer (the default) */
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
-/* $Id: convolve.c,v 1.11 2000/11/10 18:31:04 brianp Exp $ */
+/* $Id: convolve.c,v 1.12 2000/11/21 23:01:22 brianp Exp $ */
/*
* Mesa 3-D graphics library
_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
{
GLenum baseFormat;
- GLfloat rgba[MAX_CONVOLUTION_WIDTH][4];
+ GLchan rgba[MAX_CONVOLUTION_WIDTH][4];
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyConvolutionFilter1D");
}
/* read pixels from framebuffer */
+ RENDER_START(ctx);
gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y, (GLchan (*)[4]) rgba);
+ RENDER_FINISH(ctx);
/* store as convolution filter */
_mesa_ConvolutionFilter1D(target, internalFormat, width,
- GL_RGBA, GL_UNSIGNED_BYTE, rgba);
+ GL_RGBA, CHAN_TYPE, rgba);
}
GLenum baseFormat;
GLint i;
struct gl_pixelstore_attrib packSave;
- GLfloat rgba[MAX_CONVOLUTION_HEIGHT][MAX_CONVOLUTION_WIDTH][4];
+ GLchan rgba[MAX_CONVOLUTION_HEIGHT][MAX_CONVOLUTION_WIDTH][4];
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyConvolutionFilter2D");
}
/* read pixels from framebuffer */
+ RENDER_START(ctx);
for (i = 0; i < height; i++) {
gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y + i,
(GLchan (*)[4]) rgba[i]);
}
+ RENDER_FINISH(ctx);
/*
* store as convolution filter
ctx->NewState |= _NEW_PACKUNPACK;
_mesa_ConvolutionFilter2D(target, internalFormat, width, height,
- GL_RGBA, GL_UNSIGNED_BYTE, rgba);
+ GL_RGBA, CHAN_TYPE, rgba);
ctx->Unpack = packSave; /* restore pixel packing params */
ctx->NewState |= _NEW_PACKUNPACK;
filter->Height, format, type,
0, row, 0);
const GLfloat *src = filter->Filter + row * filter->Width * 4;
- /* XXX apply transfer ops or not? */
_mesa_pack_float_rgba_span(ctx, filter->Width,
(const GLfloat (*)[4]) src,
format, type, dst, &ctx->Pack, 0);