mesa: Remove EXT_convolution.
[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 * 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.
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 "context.h"
39 #include "image.h"
40 #include "macros.h"
41 #include "mtypes.h"
42 #include "state.h"
43 #include "main/dispatch.h"
44
45
46 #if FEATURE_convolve
47
48 static void GLAPIENTRY
49 _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
50 {
51 GET_CURRENT_CONTEXT(ctx);
52
53 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D");
54 }
55
56 static void GLAPIENTRY
57 _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
58 {
59 GET_CURRENT_CONTEXT(ctx);
60
61 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D");
62 }
63
64
65 static void GLAPIENTRY
66 _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
67 {
68 GET_CURRENT_CONTEXT(ctx);
69
70 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf");
71 }
72
73
74 static void GLAPIENTRY
75 _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
76 {
77 GET_CURRENT_CONTEXT(ctx);
78
79 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv");
80 }
81
82
83 static void GLAPIENTRY
84 _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
85 {
86 GET_CURRENT_CONTEXT(ctx);
87
88 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri");
89 }
90
91
92 static void GLAPIENTRY
93 _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
94 {
95 GET_CURRENT_CONTEXT(ctx);
96
97 _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv");
98 }
99
100
101 static void GLAPIENTRY
102 _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
103 {
104 GET_CURRENT_CONTEXT(ctx);
105
106 _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D");
107 }
108
109
110 static void GLAPIENTRY
111 _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
112 {
113 GET_CURRENT_CONTEXT(ctx);
114
115 _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D");
116 }
117
118
119 static void GLAPIENTRY
120 _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
121 GLvoid *image)
122 {
123 GET_CURRENT_CONTEXT(ctx);
124
125 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter");
126 }
127
128
129 static void GLAPIENTRY
130 _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
131 {
132 GET_CURRENT_CONTEXT(ctx);
133
134 _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv");
135 }
136
137
138 static void GLAPIENTRY
139 _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
140 {
141 GET_CURRENT_CONTEXT(ctx);
142
143 _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv");
144 }
145
146
147 static void GLAPIENTRY
148 _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
149 GLvoid *row, GLvoid *column, GLvoid *span)
150 {
151 GET_CURRENT_CONTEXT(ctx);
152
153 _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter");
154 }
155
156
157 static void GLAPIENTRY
158 _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
159 {
160 GET_CURRENT_CONTEXT(ctx);
161
162 _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D");
163 }
164
165 void
166 _mesa_init_convolve_dispatch(struct _glapi_table *disp)
167 {
168 SET_ConvolutionFilter1D(disp, _mesa_ConvolutionFilter1D);
169 SET_ConvolutionFilter2D(disp, _mesa_ConvolutionFilter2D);
170 SET_ConvolutionParameterf(disp, _mesa_ConvolutionParameterf);
171 SET_ConvolutionParameterfv(disp, _mesa_ConvolutionParameterfv);
172 SET_ConvolutionParameteri(disp, _mesa_ConvolutionParameteri);
173 SET_ConvolutionParameteriv(disp, _mesa_ConvolutionParameteriv);
174 SET_CopyConvolutionFilter1D(disp, _mesa_CopyConvolutionFilter1D);
175 SET_CopyConvolutionFilter2D(disp, _mesa_CopyConvolutionFilter2D);
176 SET_GetConvolutionFilter(disp, _mesa_GetConvolutionFilter);
177 SET_GetConvolutionParameterfv(disp, _mesa_GetConvolutionParameterfv);
178 SET_GetConvolutionParameteriv(disp, _mesa_GetConvolutionParameteriv);
179 SET_SeparableFilter2D(disp, _mesa_SeparableFilter2D);
180 SET_GetSeparableFilter(disp, _mesa_GetSeparableFilter);
181 }
182
183
184 #endif /* FEATURE_convolve */