diff options
author | Brian Paul <[email protected]> | 2000-11-28 00:07:51 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-11-28 00:07:51 +0000 |
commit | 45015e4d79d63183f6d9c4e4fad655921e07b0ab (patch) | |
tree | d467c862463f01c1ea0e27c12b6bf9a31d02cab5 /src/mesa/main/image.c | |
parent | 4304790e3ea6e8ba953fb53e4304777894358a93 (diff) |
Pass scale and bias values to _mesa_scale_and_bias_rgba().
Implemented post-convolution scale and bias operation.
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r-- | src/mesa/main/image.c | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 1c3203f63fe..f2003ccfbe0 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.49 2000/11/22 07:32:17 joukj Exp $ */ +/* $Id: image.c,v 1.50 2000/11/28 00:07:51 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -818,7 +818,11 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, /* scale & bias */ if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba( ctx, n, rgba ); + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.RedScale, ctx->Pixel.GreenScale, + ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, + ctx->Pixel.RedBias, ctx->Pixel.GreenBias, + ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); } /* color map lookup */ if (transferOps & IMAGE_MAP_COLOR_BIT) { @@ -832,6 +836,18 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, if (transferOps & IMAGE_CONVOLUTION_BIT) { /* this has to be done in the calling code */ } + /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ + if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.PostConvolutionScale[RCOMP], + ctx->Pixel.PostConvolutionScale[GCOMP], + ctx->Pixel.PostConvolutionScale[BCOMP], + ctx->Pixel.PostConvolutionScale[ACOMP], + ctx->Pixel.PostConvolutionBias[RCOMP], + ctx->Pixel.PostConvolutionBias[GCOMP], + ctx->Pixel.PostConvolutionBias[BCOMP], + ctx->Pixel.PostConvolutionBias[ACOMP]); + } /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); @@ -2589,7 +2605,11 @@ _mesa_unpack_chan_color_span( GLcontext *ctx, /* scale and bias colors */ if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba(ctx, n, rgba); + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.RedScale, ctx->Pixel.GreenScale, + ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, + ctx->Pixel.RedBias, ctx->Pixel.GreenBias, + ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); } /* color map lookup */ if (transferOps & IMAGE_MAP_COLOR_BIT) { @@ -2606,6 +2626,18 @@ _mesa_unpack_chan_color_span( GLcontext *ctx, if (transferOps & IMAGE_CONVOLUTION_BIT) { /* this has to be done in the calling code */ } + /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ + if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.PostConvolutionScale[RCOMP], + ctx->Pixel.PostConvolutionScale[GCOMP], + ctx->Pixel.PostConvolutionScale[BCOMP], + ctx->Pixel.PostConvolutionScale[ACOMP], + ctx->Pixel.PostConvolutionBias[RCOMP], + ctx->Pixel.PostConvolutionBias[GCOMP], + ctx->Pixel.PostConvolutionBias[BCOMP], + ctx->Pixel.PostConvolutionBias[ACOMP]); + } /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); @@ -2847,7 +2879,11 @@ _mesa_unpack_float_color_span( GLcontext *ctx, /* scale and bias colors */ if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba(ctx, n, rgba); + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.RedScale, ctx->Pixel.GreenScale, + ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, + ctx->Pixel.RedBias, ctx->Pixel.GreenBias, + ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); } /* color map lookup */ if (transferOps & IMAGE_MAP_COLOR_BIT) { @@ -2864,6 +2900,18 @@ _mesa_unpack_float_color_span( GLcontext *ctx, if (transferOps & IMAGE_CONVOLUTION_BIT) { /* XXX to do */ } + /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ + if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { + _mesa_scale_and_bias_rgba(ctx, n, rgba, + ctx->Pixel.PostConvolutionScale[RCOMP], + ctx->Pixel.PostConvolutionScale[GCOMP], + ctx->Pixel.PostConvolutionScale[BCOMP], + ctx->Pixel.PostConvolutionScale[ACOMP], + ctx->Pixel.PostConvolutionBias[RCOMP], + ctx->Pixel.PostConvolutionBias[GCOMP], + ctx->Pixel.PostConvolutionBias[BCOMP], + ctx->Pixel.PostConvolutionBias[ACOMP]); + } /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); |