2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #include "bufferobj.h"
31 #include "histogram.h"
33 #include "main/dispatch.h"
38 /**********************************************************************
43 /* this is defined below */
44 static void GLAPIENTRY
_mesa_ResetMinmax(GLenum target
);
47 static void GLAPIENTRY
48 _mesa_GetMinmax(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
, GLvoid
*values
)
50 GET_CURRENT_CONTEXT(ctx
);
52 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmax");
56 static void GLAPIENTRY
57 _mesa_GetHistogram(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
, GLvoid
*values
)
59 GET_CURRENT_CONTEXT(ctx
);
61 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogram");
65 static void GLAPIENTRY
66 _mesa_GetHistogramParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
68 GET_CURRENT_CONTEXT(ctx
);
70 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameterfv");
74 static void GLAPIENTRY
75 _mesa_GetHistogramParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
77 GET_CURRENT_CONTEXT(ctx
);
79 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameteriv");
83 static void GLAPIENTRY
84 _mesa_GetMinmaxParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
86 GET_CURRENT_CONTEXT(ctx
);
88 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameterfv");
92 static void GLAPIENTRY
93 _mesa_GetMinmaxParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
95 GET_CURRENT_CONTEXT(ctx
);
97 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameteriv");
101 static void GLAPIENTRY
102 _mesa_Histogram(GLenum target
, GLsizei width
, GLenum internalFormat
, GLboolean sink
)
104 GET_CURRENT_CONTEXT(ctx
);
106 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glHistogram");
110 static void GLAPIENTRY
111 _mesa_Minmax(GLenum target
, GLenum internalFormat
, GLboolean sink
)
113 GET_CURRENT_CONTEXT(ctx
);
115 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glMinmax");
119 static void GLAPIENTRY
120 _mesa_ResetHistogram(GLenum target
)
122 GET_CURRENT_CONTEXT(ctx
);
124 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetHistogram");
128 static void GLAPIENTRY
129 _mesa_ResetMinmax(GLenum target
)
131 GET_CURRENT_CONTEXT(ctx
);
133 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetMinmax");
138 _mesa_init_histogram_dispatch(struct _glapi_table
*disp
)
140 SET_GetHistogram(disp
, _mesa_GetHistogram
);
141 SET_GetHistogramParameterfv(disp
, _mesa_GetHistogramParameterfv
);
142 SET_GetHistogramParameteriv(disp
, _mesa_GetHistogramParameteriv
);
143 SET_GetMinmax(disp
, _mesa_GetMinmax
);
144 SET_GetMinmaxParameterfv(disp
, _mesa_GetMinmaxParameterfv
);
145 SET_GetMinmaxParameteriv(disp
, _mesa_GetMinmaxParameteriv
);
146 SET_Histogram(disp
, _mesa_Histogram
);
147 SET_Minmax(disp
, _mesa_Minmax
);
148 SET_ResetHistogram(disp
, _mesa_ResetHistogram
);
149 SET_ResetMinmax(disp
, _mesa_ResetMinmax
);
152 #endif /* FEATURE_histogram */