enabled GL_POST_CONVOLUTION_COLOR_TABLE
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 30 Jun 2000 22:09:47 +0000 (22:09 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 30 Jun 2000 22:09:47 +0000 (22:09 +0000)
src/mesa/main/drawpix.c
src/mesa/main/image.c

index 36e8af3b9394c68331e2aedff450c1241ca454c5..46a1c7d37648ac343be0c837b3b41c7983807e50 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.24 2000/06/27 21:42:13 brianp Exp $ */
+/* $Id: drawpix.c,v 1.25 2000/06/30 22:09:47 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -122,6 +122,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
        && ctx->ColorMatrix.type == MATRIX_IDENTITY
        && !ctx->Pixel.ColorTableEnabled
        && !ctx->Pixel.PostColorMatrixColorTableEnabled
+       && ctx->Pixel.PostConvolutionColorTableEnabled
        && !ctx->Pixel.MinMaxEnabled
        && !ctx->Pixel.HistogramEnabled
        && ctx->Pixel.IndexShift==0 && ctx->Pixel.IndexOffset==0
index 9bf1ad33f81d899e0d77d12e22b490cfc5702279..6d4464dbb88f8fb0f4242c41dd5045fb1f9f9820 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.34 2000/06/27 15:47:59 brianp Exp $ */
+/* $Id: image.c,v 1.35 2000/06/30 22:12:00 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -619,6 +619,7 @@ _mesa_pack_rgba_span( GLcontext *ctx,
                         ctx->Pixel.ScaleOrBiasRGBApcm ||
                         ctx->Pixel.ColorTableEnabled ||
                         ctx->Pixel.PostColorMatrixColorTableEnabled ||
+                        ctx->Pixel.PostConvolutionColorTableEnabled ||
                         ctx->Pixel.MinMaxEnabled ||
                         ctx->Pixel.HistogramEnabled);
 
@@ -675,8 +676,11 @@ _mesa_pack_rgba_span( GLcontext *ctx,
             _mesa_lookup_rgba(&ctx->ColorTable, n, rgba);
          }
          /* XXX convolution here */
-         /* XXX post-convolution color table look-up here */
-         /* color matrix */
+         /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */
+         if (ctx->Pixel.PostConvolutionColorTableEnabled) {
+            _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba);
+         }
+         /* color matrix transform */
          if (ctx->ColorMatrix.type != MATRIX_IDENTITY ||
              ctx->Pixel.ScaleOrBiasRGBApcm) {
             _mesa_transform_rgba(ctx, n, rgba);
@@ -2202,6 +2206,7 @@ _mesa_unpack_ubyte_color_span( GLcontext *ctx,
                         ctx->Pixel.ScaleOrBiasRGBApcm ||
                         ctx->Pixel.ColorTableEnabled ||
                         ctx->Pixel.PostColorMatrixColorTableEnabled ||
+                        ctx->Pixel.PostConvolutionColorTableEnabled ||
                         ctx->Pixel.MinMaxEnabled ||
                         ctx->Pixel.HistogramEnabled);
 
@@ -2319,7 +2324,10 @@ _mesa_unpack_ubyte_color_span( GLcontext *ctx,
             _mesa_lookup_rgba(&ctx->ColorTable, n, rgba);
          }
          /* XXX convolution here */
-         /* XXX post-convolution color table look-up here */
+         /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */
+         if (ctx->Pixel.PostConvolutionColorTableEnabled) {
+            _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba);
+         }
          /* color matrix transform */
          if (ctx->ColorMatrix.type != MATRIX_IDENTITY ||
              ctx->Pixel.ScaleOrBiasRGBApcm) {
@@ -2517,6 +2525,7 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
                         ctx->Pixel.ScaleOrBiasRGBApcm ||
                         ctx->Pixel.ColorTableEnabled ||
                         ctx->Pixel.PostColorMatrixColorTableEnabled ||
+                        ctx->Pixel.PostConvolutionColorTableEnabled ||
                         ctx->Pixel.MinMaxEnabled ||
                         ctx->Pixel.HistogramEnabled);
 
@@ -2584,7 +2593,10 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
             _mesa_lookup_rgba(&ctx->ColorTable, n, rgba);
          }
          /* XXX convolution here */
-         /* XXX post-convolution color table look-up here */
+         /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */
+         if (ctx->Pixel.PostConvolutionColorTableEnabled) {
+            _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba);
+         }
          /* color matrix transform */
          if (ctx->ColorMatrix.type != MATRIX_IDENTITY ||
              ctx->Pixel.ScaleOrBiasRGBApcm) {