#include "ffvertex_prog.h"
#include "framebuffer.h"
#include "hint.h"
-#if FEATURE_histogram
#include "histogram.h"
-#endif
#include "imports.h"
#include "light.h"
#include "lines.h"
_mesa_init_colortable_dispatch(exec);
_mesa_init_convolve_dispatch(exec);
-#if FEATURE_histogram
- SET_GetHistogram(exec, _mesa_GetHistogram);
- SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv);
- SET_GetHistogramParameteriv(exec, _mesa_GetHistogramParameteriv);
- SET_GetMinmax(exec, _mesa_GetMinmax);
- SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv);
- SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv);
- SET_Histogram(exec, _mesa_Histogram);
- SET_Minmax(exec, _mesa_Minmax);
- SET_ResetHistogram(exec, _mesa_ResetHistogram);
- SET_ResetMinmax(exec, _mesa_ResetMinmax);
-#endif
+ _mesa_init_histogram_dispatch(exec);
/* OpenGL 2.0 */
SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate);
#include "context.h"
#include "image.h"
#include "histogram.h"
+#include "glapi/dispatch.h"
+#if FEATURE_histogram
+
/*
* XXX the packed pixel formats haven't been tested.
*/
-void GLAPIENTRY
+/* this is defined below */
+static void GLAPIENTRY _mesa_ResetMinmax(GLenum target);
+
+
+static void GLAPIENTRY
_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
{
GLuint i;
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
{
GET_CURRENT_CONTEXT(ctx);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ResetHistogram(GLenum target)
{
GLuint i;
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ResetMinmax(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
}
+void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp)
+{
+ SET_GetHistogram(disp, _mesa_GetHistogram);
+ SET_GetHistogramParameterfv(disp, _mesa_GetHistogramParameterfv);
+ SET_GetHistogramParameteriv(disp, _mesa_GetHistogramParameteriv);
+ SET_GetMinmax(disp, _mesa_GetMinmax);
+ SET_GetMinmaxParameterfv(disp, _mesa_GetMinmaxParameterfv);
+ SET_GetMinmaxParameteriv(disp, _mesa_GetMinmaxParameteriv);
+ SET_Histogram(disp, _mesa_Histogram);
+ SET_Minmax(disp, _mesa_Minmax);
+ SET_ResetHistogram(disp, _mesa_ResetHistogram);
+ SET_ResetMinmax(disp, _mesa_ResetMinmax);
+}
+
+
+#endif /* FEATURE_histogram */
+
/**********************************************************************/
/***** Initialization *****/
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
-#include "glheader.h"
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_histogram
-extern void GLAPIENTRY
-_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values);
+extern void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+#else /* FEATURE_histogram */
-extern void GLAPIENTRY
-_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params);
+static INLINE void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp)
+{
+}
-extern void GLAPIENTRY
-_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params);
-
-extern void GLAPIENTRY
-_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_Histogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-
-extern void GLAPIENTRY
-_mesa_Minmax(GLenum target, GLenum internalformat, GLboolean sink);
-
-extern void GLAPIENTRY
-_mesa_ResetHistogram(GLenum target);
-
-extern void GLAPIENTRY
-_mesa_ResetMinmax(GLenum target);
+#endif /* FEATURE_histogram */
extern void _mesa_init_histogram( GLcontext * ctx );
-#else
-
-/** No-op */
-#define _mesa_init_histogram( c ) ((void) 0)
-
-#endif
-
-#endif
+#endif /* HISTOGRAM_H */