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