2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2006 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 * Image convolution functions.
29 * Notes: filter kernel elements are indexed by <n> and <m> as in
37 #include "main/dispatch.h"
41 _mesa_ConvolutionFilter1D(GLenum target
, GLenum internalFormat
, GLsizei width
, GLenum format
, GLenum type
, const GLvoid
*image
)
43 GET_CURRENT_CONTEXT(ctx
);
45 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionFilter1D");
49 _mesa_ConvolutionFilter2D(GLenum target
, GLenum internalFormat
, GLsizei width
, GLsizei height
, GLenum format
, GLenum type
, const GLvoid
*image
)
51 GET_CURRENT_CONTEXT(ctx
);
53 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionFilter2D");
58 _mesa_ConvolutionParameterf(GLenum target
, GLenum pname
, GLfloat param
)
60 GET_CURRENT_CONTEXT(ctx
);
62 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionParameterf");
67 _mesa_ConvolutionParameterfv(GLenum target
, GLenum pname
, const GLfloat
*params
)
69 GET_CURRENT_CONTEXT(ctx
);
71 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionParameterfv");
76 _mesa_ConvolutionParameteri(GLenum target
, GLenum pname
, GLint param
)
78 GET_CURRENT_CONTEXT(ctx
);
80 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionParameteri");
85 _mesa_ConvolutionParameteriv(GLenum target
, GLenum pname
, const GLint
*params
)
87 GET_CURRENT_CONTEXT(ctx
);
89 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glConvolutionParameteriv");
94 _mesa_CopyConvolutionFilter1D(GLenum target
, GLenum internalFormat
, GLint x
, GLint y
, GLsizei width
)
96 GET_CURRENT_CONTEXT(ctx
);
98 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glCopyConvolutionFilter1D");
103 _mesa_CopyConvolutionFilter2D(GLenum target
, GLenum internalFormat
, GLint x
, GLint y
, GLsizei width
, GLsizei height
)
105 GET_CURRENT_CONTEXT(ctx
);
107 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glCopyConvolutionFilter2D");
112 _mesa_GetnConvolutionFilterARB(GLenum target
, GLenum format
, GLenum type
,
113 GLsizei bufSize
, GLvoid
*image
)
115 GET_CURRENT_CONTEXT(ctx
);
117 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetConvolutionFilter");
122 _mesa_GetConvolutionFilter(GLenum target
, GLenum format
, GLenum type
,
125 _mesa_GetnConvolutionFilterARB(target
, format
, type
, INT_MAX
, image
);
130 _mesa_GetConvolutionParameterfv(GLenum target
, GLenum pname
, GLfloat
*params
)
132 GET_CURRENT_CONTEXT(ctx
);
134 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetConvolutionParameterfv");
139 _mesa_GetConvolutionParameteriv(GLenum target
, GLenum pname
, GLint
*params
)
141 GET_CURRENT_CONTEXT(ctx
);
143 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetConvolutionParameteriv");
148 _mesa_GetnSeparableFilterARB(GLenum target
, GLenum format
, GLenum type
,
149 GLsizei rowBufSize
, GLvoid
*row
,
150 GLsizei columnBufSize
, GLvoid
*column
,
153 GET_CURRENT_CONTEXT(ctx
);
155 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glGetSeparableFilter");
160 _mesa_GetSeparableFilter(GLenum target
, GLenum format
, GLenum type
,
161 GLvoid
*row
, GLvoid
*column
, GLvoid
*span
)
163 _mesa_GetnSeparableFilterARB(target
, format
, type
, INT_MAX
, row
,
164 INT_MAX
, column
, span
);
169 _mesa_SeparableFilter2D(GLenum target
, GLenum internalFormat
, GLsizei width
, GLsizei height
, GLenum format
, GLenum type
, const GLvoid
*row
, const GLvoid
*column
)
171 GET_CURRENT_CONTEXT(ctx
);
173 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glSeparableFilter2D");