summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-22 17:41:05 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-22 17:41:05 +0000
commita360f2a06347f996f97ea7736547df8121d11912 (patch)
treeaf6dca4bec87666954d2b657b7c52c269dbad058
parent228ab487b8d5a48019914fe844e10a44d58a73f5 (diff)
from trunk: GL_INDEX_OFFSET plus CI->RGB mapping didn't work
-rw-r--r--src/mesa/swrast/s_drawpix.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index b6aa777578..1965a7faad 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -64,6 +64,11 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
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)
@@ -159,8 +164,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
* 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
+ (skipRows * rowLength + skipPixels) * 4;
@@ -198,8 +202,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
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
+ (skipRows * rowLength + skipPixels) * 3;
@@ -236,8 +239,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
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
+ (skipRows * rowLength + skipPixels);
@@ -298,8 +300,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
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
+ (skipRows * rowLength + skipPixels)*2;
@@ -413,7 +414,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
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) {