/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
if (swrast->_RasterMask & MULTI_DRAW_BIT)
return GL_FALSE;
+ if (ctx->_ImageTransferState) {
+ /* don't handle any pixel transfer options here */
+ return GL_FALSE;
+ }
+
if (ctx->Depth.Test)
_swrast_span_default_z(ctx, &span);
if (swrast->_FogEnabled)
* skip "skipRows" rows and skip "skipPixels" pixels/row.
*/
- if (format == GL_RGBA && type == CHAN_TYPE
- && ctx->_ImageTransferState==0) {
+ if (format == GL_RGBA && type == CHAN_TYPE) {
if (ctx->Visual.rgbMode) {
- GLchan *src = (GLchan *) pixels
+ const GLchan *src = (const GLchan *) pixels
+ (skipRows * rowLength + skipPixels) * 4;
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
/* no zooming */
}
return GL_TRUE;
}
- else if (format == GL_RGB && type == CHAN_TYPE
- && ctx->_ImageTransferState == 0) {
+ else if (format == GL_RGB && type == CHAN_TYPE) {
if (ctx->Visual.rgbMode) {
- GLchan *src = (GLchan *) pixels
+ const GLchan *src = (const GLchan *) pixels
+ (skipRows * rowLength + skipPixels) * 3;
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
GLint row;
}
return GL_TRUE;
}
- else if (format == GL_LUMINANCE && type == CHAN_TYPE
- && ctx->_ImageTransferState==0) {
+ else if (format == GL_LUMINANCE && type == CHAN_TYPE) {
if (ctx->Visual.rgbMode) {
- GLchan *src = (GLchan *) pixels
+ const GLchan *src = (const GLchan *) pixels
+ (skipRows * rowLength + skipPixels);
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
/* no zooming */
}
return GL_TRUE;
}
- else if (format == GL_LUMINANCE_ALPHA && type == CHAN_TYPE
- && ctx->_ImageTransferState == 0) {
+ else if (format == GL_LUMINANCE_ALPHA && type == CHAN_TYPE) {
if (ctx->Visual.rgbMode) {
- GLchan *src = (GLchan *) pixels
+ const GLchan *src = (const GLchan *) pixels
+ (skipRows * rowLength + skipPixels)*2;
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
/* no zooming */
ASSERT(drawWidth <= MAX_WIDTH);
for (row=0; row<drawHeight; row++) {
GLint i;
- GLchan *ptr = src;
+ const GLchan *ptr = src;
for (i=0;i<drawWidth;i++) {
span.array->rgba[i][0] = *ptr;
span.array->rgba[i][1] = *ptr;
ASSERT(drawWidth <= MAX_WIDTH);
for (row=0; row<drawHeight; row++) {
GLint i;
- GLchan *ptr = src;
+ const GLchan *ptr = src;
for (i=0;i<drawWidth;i++) {
span.array->rgba[i][0] = *ptr;
span.array->rgba[i][1] = *ptr;
GLint row;
ASSERT(drawWidth <= MAX_WIDTH);
for (row=0; row<drawHeight; row++) {
- GLchan *ptr = src;
+ const GLchan *ptr = src;
GLint i;
for (i=0;i<drawWidth;i++) {
span.array->rgba[i][0] = *ptr;
return GL_TRUE;
}
else if (format==GL_COLOR_INDEX && type==GL_UNSIGNED_BYTE) {
- GLubyte *src = (GLubyte *) pixels + skipRows * rowLength + skipPixels;
+ const GLubyte *src =
+ (const GLubyte *) pixels + skipRows * rowLength + skipPixels;
if (ctx->Visual.rgbMode) {
/* convert CI data to RGBA */
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
return GL_TRUE;
}
}
- else if (ctx->_ImageTransferState==0) {
+ else {
/* write CI data to CI frame buffer */
GLint row;
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {