diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/config.h | 5 | ||||
-rw-r--r-- | src/mesa/main/context.c | 28 |
2 files changed, 31 insertions, 2 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 0a25acc69f9..ffafd3e78d6 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 ca95e430c0b..db3a14ba984 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 ); |