From: Brian Paul Date: Fri, 7 Apr 2000 00:19:41 +0000 (+0000) Subject: initial histogram and min/max work X-Git-Tag: mesa-7.8~14743 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0771d159d59a856135e375ba89f6af2a057d4f5b;p=platform%2Fupstream%2Fmesa.git initial histogram and min/max work --- diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 0a25acc..ffafd3e 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -1,4 +1,4 @@ -/* $Id: config.h,v 1.8 2000/03/16 07:36:33 keithw Exp $ */ +/* $Id: config.h,v 1.9 2000/04/07 00:19:41 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -112,6 +112,9 @@ /* Subpixel precision for antialiasing, window coordinate snapping */ #define SUB_PIXEL_BITS 4 +/* Size of histogram tables */ +#define HISTOGRAM_TABLE_SIZE 256 + /* diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index ca95e43..db3a14b 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.53 2000/04/04 15:14:10 brianp Exp $ */ +/* $Id: context.c,v 1.54 2000/04/07 00:19:41 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -993,6 +993,32 @@ static void init_attrib_groups( GLcontext *ctx ) ctx->Hint.AllowDrawMem = GL_TRUE; ctx->Hint.StrictLighting = GL_TRUE; + /* Histogram group */ + ctx->Histogram.Width = 0; + ctx->Histogram.Format = GL_RGBA; + ctx->Histogram.Sink = GL_FALSE; + ctx->Histogram.RedSize = 0xffffffff; + ctx->Histogram.GreenSize = 0xffffffff; + ctx->Histogram.BlueSize = 0xffffffff; + ctx->Histogram.AlphaSize = 0xffffffff; + ctx->Histogram.LuminanceSize = 0xffffffff; + for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) { + ctx->Histogram.Count[i][0] = 0; + ctx->Histogram.Count[i][1] = 0; + ctx->Histogram.Count[i][2] = 0; + ctx->Histogram.Count[i][3] = 0; + } + + /* Min/Max group */ + ctx->MinMax.Format = GL_RGBA; + ctx->MinMax.Sink = GL_FALSE; + ctx->MinMax.Min[RCOMP] = 1000; ctx->MinMax.Max[RCOMP] = -1000; + ctx->MinMax.Min[GCOMP] = 1000; ctx->MinMax.Max[GCOMP] = -1000; + ctx->MinMax.Min[BCOMP] = 1000; ctx->MinMax.Max[BCOMP] = -1000; + ctx->MinMax.Min[ACOMP] = 1000; ctx->MinMax.Max[ACOMP] = -1000; + + + /* Pipeline */ gl_pipeline_init( ctx ); gl_cva_init( ctx );