-/* $Id: get.c,v 1.21 2000/04/12 00:27:37 brianp Exp $ */
+/* $Id: get.c,v 1.22 2000/05/04 13:48:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
case GL_GREEN_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale);
break;
+ case GL_HISTOGRAM:
+ *params = ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = INT_TO_BOOL( ctx->Visual->IndexBits );
break;
params[0] = INT_TO_BOOL(MAX_WIDTH);
params[1] = INT_TO_BOOL(MAX_HEIGHT);
break;
+ case GL_MINMAX:
+ *params = ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = FLOAT_TO_BOOL(ctx->ModelView.m[i]);
case GL_GREEN_SCALE:
*params = (GLdouble) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLdouble) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLdouble) ctx->Visual->IndexBits;
break;
params[0] = (GLdouble) MAX_WIDTH;
params[1] = (GLdouble) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLdouble) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = (GLdouble) ctx->ModelView.m[i];
case GL_GREEN_SCALE:
*params = (GLfloat) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLfloat) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLfloat) ctx->Visual->IndexBits;
break;
params[0] = (GLfloat) MAX_WIDTH;
params[1] = (GLfloat) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLfloat) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = ctx->ModelView.m[i];
case GL_GREEN_SCALE:
*params = (GLint) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLint) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLint) ctx->Visual->IndexBits;
break;
params[0] = (GLint) MAX_WIDTH;
params[1] = (GLint) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLint) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = (GLint) ctx->ModelView.m[i];
-/* $Id: image.c,v 1.29 2000/04/18 14:32:10 brianp Exp $ */
+/* $Id: image.c,v 1.30 2000/05/04 13:48:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* Test for optimized case first */
if (!applyTransferOps && format == GL_RGBA && type == GL_UNSIGNED_BYTE) {
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
if (ctx->MinMax.Sink)
return;
}
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* Try simple cases first */
if (!applyTransferOps && srcType == GL_UNSIGNED_BYTE) {
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
}
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* general solution, no special cases, yet */
{
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
}
-/* $Id: state.c,v 1.9 2000/04/09 17:08:09 brianp Exp $ */
+/* $Id: state.c,v 1.10 2000/05/04 13:48:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
exec->TexImage3D = _mesa_TexImage3D;
exec->TexSubImage3D = _mesa_TexSubImage3D;
-
/* OpenGL 1.2 GL_ARB_imaging */
exec->BlendColor = _mesa_BlendColor;
exec->BlendEquation = _mesa_BlendEquation;
exec->ResetMinmax = _mesa_ResetMinmax;
exec->SeparableFilter2D = _mesa_SeparableFilter2D;
- /* GL_EXT_texture3d */
+ /* 2. GL_EXT_blend_color */
+#if 0
+ exec->BlendColorEXT = _mesa_BlendColorEXT;
+#endif
+
+ /* 3. GL_EXT_polygon_offset */
+ exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
+
+ /* 6. GL_EXT_texture3d */
#if 0
exec->CopyTexSubImage3DEXT = _mesa_CopyTexSubImage3D;
exec->TexImage3DEXT = _mesa_TexImage3DEXT;
exec->TexSubImage3DEXT = _mesa_TexSubImage3D;
#endif
- /* GL_EXT_paletted_texture */
-#if 0
- exec->ColorTableEXT = _mesa_ColorTableEXT;
- exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
-#endif
- exec->GetColorTableEXT = _mesa_GetColorTable;
- exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
- exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
+ /* 11. GL_EXT_histogram */
+ exec->GetHistogramEXT = _mesa_GetHistogram;
+ exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv;
+ exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv;
+ exec->GetMinmaxEXT = _mesa_GetMinmax;
+ exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv;
+ exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv;
- /* GL_SGIX_pixel_texture */
+ /* ?. GL_SGIX_pixel_texture */
exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX;
- /* GL_SGIS_pixel_texture */
+ /* 15. GL_SGIS_pixel_texture */
exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS;
exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS;
exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS;
exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS;
exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS;
- /* GL_EXT_compiled_vertex_array */
- exec->LockArraysEXT = _mesa_LockArraysEXT;
- exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+ /* 37. GL_EXT_blend_minmax */
+#if 0
+ exec->BlendEquationEXT = _mesa_BlendEquationEXT;
+#endif
- /* GL_EXT_point_parameters */
+ /* 54. GL_EXT_point_parameters */
exec->PointParameterfEXT = _mesa_PointParameterfEXT;
exec->PointParameterfvEXT = _mesa_PointParameterfvEXT;
- /* GL_PGI_misc_hints */
+ /* 77. GL_PGI_misc_hints */
exec->HintPGI = _mesa_HintPGI;
- /* GL_EXT_polygon_offset */
- exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
-
- /* GL_EXT_blend_minmax */
+ /* 78. GL_EXT_paletted_texture */
#if 0
- exec->BlendEquationEXT = _mesa_BlendEquationEXT;
+ exec->ColorTableEXT = _mesa_ColorTableEXT;
+ exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
#endif
+ exec->GetColorTableEXT = _mesa_GetColorTable;
+ exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
+ exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
- /* GL_EXT_blend_color */
-#if 0
- exec->BlendColorEXT = _mesa_BlendColorEXT;
-#endif
+ /* 97. GL_EXT_compiled_vertex_array */
+ exec->LockArraysEXT = _mesa_LockArraysEXT;
+ exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+
+ /* 173. GL_INGR_blend_func_separate */
+ exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
+
+ /* 196. GL_MESA_resize_buffers */
+ exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
+
+ /* 197. GL_MESA_window_pos */
+ exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
+ exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA;
+ exec->WindowPos2fMESA = _mesa_WindowPos2fMESA;
+ exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA;
+ exec->WindowPos2iMESA = _mesa_WindowPos2iMESA;
+ exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA;
+ exec->WindowPos2sMESA = _mesa_WindowPos2sMESA;
+ exec->WindowPos2svMESA = _mesa_WindowPos2svMESA;
+ exec->WindowPos3dMESA = _mesa_WindowPos3dMESA;
+ exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA;
+ exec->WindowPos3fMESA = _mesa_WindowPos3fMESA;
+ exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA;
+ exec->WindowPos3iMESA = _mesa_WindowPos3iMESA;
+ exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA;
+ exec->WindowPos3sMESA = _mesa_WindowPos3sMESA;
+ exec->WindowPos3svMESA = _mesa_WindowPos3svMESA;
+ exec->WindowPos4dMESA = _mesa_WindowPos4dMESA;
+ exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA;
+ exec->WindowPos4fMESA = _mesa_WindowPos4fMESA;
+ exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA;
+ exec->WindowPos4iMESA = _mesa_WindowPos4iMESA;
+ exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA;
+ exec->WindowPos4sMESA = _mesa_WindowPos4sMESA;
+ exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
- /* GL_ARB_multitexture */
+ /* ARB 1. GL_ARB_multitexture */
exec->ActiveTextureARB = _mesa_ActiveTextureARB;
exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB;
exec->MultiTexCoord1dARB = _mesa_MultiTexCoord1dARB;
exec->MultiTexCoord4sARB = _mesa_MultiTexCoord4sARB;
exec->MultiTexCoord4svARB = _mesa_MultiTexCoord4svARB;
- /* GL_INGR_blend_func_separate */
- exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
-
- /* GL_MESA_window_pos */
- exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
- exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA;
- exec->WindowPos2fMESA = _mesa_WindowPos2fMESA;
- exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA;
- exec->WindowPos2iMESA = _mesa_WindowPos2iMESA;
- exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA;
- exec->WindowPos2sMESA = _mesa_WindowPos2sMESA;
- exec->WindowPos2svMESA = _mesa_WindowPos2svMESA;
- exec->WindowPos3dMESA = _mesa_WindowPos3dMESA;
- exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA;
- exec->WindowPos3fMESA = _mesa_WindowPos3fMESA;
- exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA;
- exec->WindowPos3iMESA = _mesa_WindowPos3iMESA;
- exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA;
- exec->WindowPos3sMESA = _mesa_WindowPos3sMESA;
- exec->WindowPos3svMESA = _mesa_WindowPos3svMESA;
- exec->WindowPos4dMESA = _mesa_WindowPos4dMESA;
- exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA;
- exec->WindowPos4fMESA = _mesa_WindowPos4fMESA;
- exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA;
- exec->WindowPos4iMESA = _mesa_WindowPos4iMESA;
- exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA;
- exec->WindowPos4sMESA = _mesa_WindowPos4sMESA;
- exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
-
- /* GL_MESA_resize_buffers */
- exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
-
- /* GL_ARB_transpose_matrix */
+ /* ARB 3. GL_ARB_transpose_matrix */
exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB;
exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB;
exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB;