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 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
28 #include "bufferobj.h"
30 #include "histogram.h"
32 #include "main/dispatch.h"
35 /**********************************************************************
41 _mesa_GetnMinmaxARB(GLenum target
, GLboolean reset
, GLenum format
,
42 GLenum type
, GLsizei bufSize
, GLvoid
*values
)
44 GET_CURRENT_CONTEXT(ctx
);
46 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmax");
51 _mesa_GetMinmax(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
,
54 _mesa_GetnMinmaxARB(target
, reset
, format
, type
, INT_MAX
, values
);
59 _mesa_GetnHistogramARB(GLenum target
, GLboolean reset
, GLenum format
,
60 GLenum type
, GLsizei bufSize
, GLvoid
*values
)
62 GET_CURRENT_CONTEXT(ctx
);
64 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogram");
69 _mesa_GetHistogram(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
,
72 _mesa_GetnHistogramARB(target
, reset
, format
, type
, INT_MAX
, values
);
77 _mesa_GetHistogramParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
79 GET_CURRENT_CONTEXT(ctx
);
81 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameterfv");
86 _mesa_GetHistogramParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
88 GET_CURRENT_CONTEXT(ctx
);
90 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameteriv");
95 _mesa_GetMinmaxParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
97 GET_CURRENT_CONTEXT(ctx
);
99 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameterfv");
104 _mesa_GetMinmaxParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
106 GET_CURRENT_CONTEXT(ctx
);
108 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameteriv");
113 _mesa_Histogram(GLenum target
, GLsizei width
, GLenum internalFormat
, GLboolean sink
)
115 GET_CURRENT_CONTEXT(ctx
);
117 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glHistogram");
122 _mesa_Minmax(GLenum target
, GLenum internalFormat
, GLboolean sink
)
124 GET_CURRENT_CONTEXT(ctx
);
126 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glMinmax");
131 _mesa_ResetHistogram(GLenum target
)
133 GET_CURRENT_CONTEXT(ctx
);
135 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetHistogram");
140 _mesa_ResetMinmax(GLenum target
)
142 GET_CURRENT_CONTEXT(ctx
);
144 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetMinmax");