mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.
[mesa.git] / src / mesa / main / convolve.c
1 /*
2 * Mesa 3-D graphics library
3 * Version: 6.5.2
4 *
5 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
6 *
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:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
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 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.
23 */
24
25
26 /*
27 * Image convolution functions.
28 *
29 * Notes: filter kernel elements are indexed by <n> and <m> as in
30 * the GL spec.
31 */
32
33
34 #include "glheader.h"
35 #include "bufferobj.h"
36 #include "colormac.h"
37 #include "convolve.h"
38 #include "macros.h"
39 #include "mtypes.h"
40 #include "main/dispatch.h"
41
42
43 void GLAPIENTRY
44 _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
45 {
46 GET_CURRENT_CONTEXT(ctx);
47
48 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D");
49 }
50
51 void GLAPIENTRY
52 _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
53 {
54 GET_CURRENT_CONTEXT(ctx);
55
56 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D");
57 }
58
59
60 void GLAPIENTRY
61 _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
62 {
63 GET_CURRENT_CONTEXT(ctx);
64
65 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf");
66 }
67
68
69 void GLAPIENTRY
70 _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
71 {
72 GET_CURRENT_CONTEXT(ctx);
73
74 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv");
75 }
76
77
78 void GLAPIENTRY
79 _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
80 {
81 GET_CURRENT_CONTEXT(ctx);
82
83 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri");
84 }
85
86
87 void GLAPIENTRY
88 _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
89 {
90 GET_CURRENT_CONTEXT(ctx);
91
92 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv");
93 }
94
95
96 void GLAPIENTRY
97 _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
98 {
99 GET_CURRENT_CONTEXT(ctx);
100
101 _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D");
102 }
103
104
105 void GLAPIENTRY
106 _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
107 {
108 GET_CURRENT_CONTEXT(ctx);
109
110 _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D");
111 }
112
113
114 void GLAPIENTRY
115 _mesa_GetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type,
116 GLsizei bufSize, GLvoid *image)
117 {
118 GET_CURRENT_CONTEXT(ctx);
119
120 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter");
121 }
122
123
124 void GLAPIENTRY
125 _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
126 GLvoid *image)
127 {
128 _mesa_GetnConvolutionFilterARB(target, format, type, INT_MAX, image);
129 }
130
131
132 void GLAPIENTRY
133 _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
134 {
135 GET_CURRENT_CONTEXT(ctx);
136
137 _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv");
138 }
139
140
141 void GLAPIENTRY
142 _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
143 {
144 GET_CURRENT_CONTEXT(ctx);
145
146 _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv");
147 }
148
149
150 void GLAPIENTRY
151 _mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type,
152 GLsizei rowBufSize, GLvoid *row,
153 GLsizei columnBufSize, GLvoid *column,
154 GLvoid *span)
155 {
156 GET_CURRENT_CONTEXT(ctx);
157
158 _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter");
159 }
160
161
162 void GLAPIENTRY
163 _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
164 GLvoid *row, GLvoid *column, GLvoid *span)
165 {
166 _mesa_GetnSeparableFilterARB(target, format, type, INT_MAX, row,
167 INT_MAX, column, span);
168 }
169
170
171 void GLAPIENTRY
172 _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
173 {
174 GET_CURRENT_CONTEXT(ctx);
175
176 _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D");
177 }