2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
27 #include "bufferobj.h"
29 #include "histogram.h"
31 #include "main/dispatch.h"
34 /**********************************************************************
40 _mesa_GetnMinmaxARB(GLenum target
, GLboolean reset
, GLenum format
,
41 GLenum type
, GLsizei bufSize
, GLvoid
*values
)
43 GET_CURRENT_CONTEXT(ctx
);
45 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmax");
50 _mesa_GetMinmax(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
,
53 _mesa_GetnMinmaxARB(target
, reset
, format
, type
, INT_MAX
, values
);
58 _mesa_GetnHistogramARB(GLenum target
, GLboolean reset
, GLenum format
,
59 GLenum type
, GLsizei bufSize
, GLvoid
*values
)
61 GET_CURRENT_CONTEXT(ctx
);
63 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogram");
68 _mesa_GetHistogram(GLenum target
, GLboolean reset
, GLenum format
, GLenum type
,
71 _mesa_GetnHistogramARB(target
, reset
, format
, type
, INT_MAX
, values
);
76 _mesa_GetHistogramParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
78 GET_CURRENT_CONTEXT(ctx
);
80 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameterfv");
85 _mesa_GetHistogramParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
87 GET_CURRENT_CONTEXT(ctx
);
89 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetHistogramParameteriv");
94 _mesa_GetMinmaxParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
96 GET_CURRENT_CONTEXT(ctx
);
98 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameterfv");
103 _mesa_GetMinmaxParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
105 GET_CURRENT_CONTEXT(ctx
);
107 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetMinmaxParameteriv");
112 _mesa_Histogram(GLenum target
, GLsizei width
, GLenum internalFormat
, GLboolean sink
)
114 GET_CURRENT_CONTEXT(ctx
);
116 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glHistogram");
121 _mesa_Minmax(GLenum target
, GLenum internalFormat
, GLboolean sink
)
123 GET_CURRENT_CONTEXT(ctx
);
125 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glMinmax");
130 _mesa_ResetHistogram(GLenum target
)
132 GET_CURRENT_CONTEXT(ctx
);
134 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetHistogram");
139 _mesa_ResetMinmax(GLenum target
)
141 GET_CURRENT_CONTEXT(ctx
);
143 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glResetMinmax");