* extensions into either swrast or a sister module.
*/
+#include "main/glheader.h"
+#include "main/colortab.h"
+#include "main/convolve.h"
#include "s_context.h"
#include "s_span.h"
-#include "colortab.h"
-#include "convolve.h"
void
GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width)
{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan data[MAX_WIDTH][4];
struct gl_buffer_object *bufferSave;
if (width > MAX_WIDTH)
width = MAX_WIDTH;
+ RENDER_START( swrast, ctx );
+
/* read the data from framebuffer */
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, x, y, data );
+ width, x, y, CHAN_TYPE, data );
+
+ RENDER_FINISH(swrast,ctx);
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
_swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width)
{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan data[MAX_WIDTH][4];
struct gl_buffer_object *bufferSave;
if (width > MAX_WIDTH)
width = MAX_WIDTH;
+ RENDER_START( swrast, ctx );
+
/* read the data from framebuffer */
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, x, y, data );
+ width, x, y, CHAN_TYPE, data );
+
+ RENDER_FINISH(swrast,ctx);
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
/* read the data from framebuffer */
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, x, y, (GLchan (*)[4]) rgba );
+ width, x, y, CHAN_TYPE, rgba );
RENDER_FINISH( swrast, ctx );
/* read pixels from framebuffer */
for (i = 0; i < height; i++) {
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, x, y + i, (GLchan (*)[4]) rgba[i] );
+ width, x, y + i, CHAN_TYPE, rgba[i] );
}
RENDER_FINISH(swrast,ctx);