-/* $Id: image.c,v 1.11 1999/11/03 17:27:05 brianp Exp $ */
+/* $Id: image.c,v 1.12 1999/11/03 18:24:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
ASSERT(ctx->Visual->RGBAflag);
applyTransferOps &= (ctx->Pixel.ScaleOrBiasRGBA ||
- ctx->Pixel.MapColorFlag ||
ctx->Pixel.MapColorFlag);
/* Try simple cases first */
return;
}
}
- else if (dstFormat == GL_ALPHA && srcFormat == GL_ALPHA) {
- MEMCPY( dest, source, n * sizeof(GLubyte) );
+ else if (dstFormat == srcFormat) {
+ GLint comps = gl_components_in_format(srcFormat);
+ assert(comps > 0);
+ MEMCPY( dest, source, n * comps * sizeof(GLubyte) );
return;
}
}
/*
- * XXX this is where more color table lookups, convolution and
- * histogram would take place, if implemented.
+ * XXX This is where more color table lookups, convolution,
+ * histograms, minmax, color matrix, etc would take place if
+ * implemented.
+ * See figure 3.7 in the OpenGL 1.2 specification for more info.
*/