convolve.c revision 848b8605
1848b8605Smrg/* 2848b8605Smrg * Mesa 3-D graphics library 3848b8605Smrg * 4848b8605Smrg * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 5848b8605Smrg * 6848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 7848b8605Smrg * copy of this software and associated documentation files (the "Software"), 8848b8605Smrg * to deal in the Software without restriction, including without limitation 9848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the 11848b8605Smrg * Software is furnished to do so, subject to the following conditions: 12848b8605Smrg * 13848b8605Smrg * The above copyright notice and this permission notice shall be included 14848b8605Smrg * in all copies or substantial portions of the Software. 15848b8605Smrg * 16848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20848b8605Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21848b8605Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22848b8605Smrg * OTHER DEALINGS IN THE SOFTWARE. 23848b8605Smrg */ 24848b8605Smrg 25848b8605Smrg 26848b8605Smrg/* 27848b8605Smrg * Image convolution functions. 28848b8605Smrg * 29848b8605Smrg * Notes: filter kernel elements are indexed by <n> and <m> as in 30848b8605Smrg * the GL spec. 31848b8605Smrg */ 32848b8605Smrg 33848b8605Smrg 34848b8605Smrg#include "glheader.h" 35848b8605Smrg#include "bufferobj.h" 36848b8605Smrg#include "colormac.h" 37848b8605Smrg#include "convolve.h" 38848b8605Smrg#include "macros.h" 39848b8605Smrg#include "mtypes.h" 40848b8605Smrg#include "main/dispatch.h" 41848b8605Smrg 42848b8605Smrg 43848b8605Smrgvoid GLAPIENTRY 44848b8605Smrg_mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) 45848b8605Smrg{ 46848b8605Smrg GET_CURRENT_CONTEXT(ctx); 47848b8605Smrg 48848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D"); 49848b8605Smrg} 50848b8605Smrg 51848b8605Smrgvoid GLAPIENTRY 52848b8605Smrg_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) 53848b8605Smrg{ 54848b8605Smrg GET_CURRENT_CONTEXT(ctx); 55848b8605Smrg 56848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D"); 57848b8605Smrg} 58848b8605Smrg 59848b8605Smrg 60848b8605Smrgvoid GLAPIENTRY 61848b8605Smrg_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) 62848b8605Smrg{ 63848b8605Smrg GET_CURRENT_CONTEXT(ctx); 64848b8605Smrg 65848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterf"); 66848b8605Smrg} 67848b8605Smrg 68848b8605Smrg 69848b8605Smrgvoid GLAPIENTRY 70848b8605Smrg_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) 71848b8605Smrg{ 72848b8605Smrg GET_CURRENT_CONTEXT(ctx); 73848b8605Smrg 74848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterfv"); 75848b8605Smrg} 76848b8605Smrg 77848b8605Smrg 78848b8605Smrgvoid GLAPIENTRY 79848b8605Smrg_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) 80848b8605Smrg{ 81848b8605Smrg GET_CURRENT_CONTEXT(ctx); 82848b8605Smrg 83848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteri"); 84848b8605Smrg} 85848b8605Smrg 86848b8605Smrg 87848b8605Smrgvoid GLAPIENTRY 88848b8605Smrg_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) 89848b8605Smrg{ 90848b8605Smrg GET_CURRENT_CONTEXT(ctx); 91848b8605Smrg 92848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteriv"); 93848b8605Smrg} 94848b8605Smrg 95848b8605Smrg 96848b8605Smrgvoid GLAPIENTRY 97848b8605Smrg_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width) 98848b8605Smrg{ 99848b8605Smrg GET_CURRENT_CONTEXT(ctx); 100848b8605Smrg 101848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter1D"); 102848b8605Smrg} 103848b8605Smrg 104848b8605Smrg 105848b8605Smrgvoid GLAPIENTRY 106848b8605Smrg_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height) 107848b8605Smrg{ 108848b8605Smrg GET_CURRENT_CONTEXT(ctx); 109848b8605Smrg 110848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter2D"); 111848b8605Smrg} 112848b8605Smrg 113848b8605Smrg 114848b8605Smrgvoid GLAPIENTRY 115848b8605Smrg_mesa_GetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, 116848b8605Smrg GLsizei bufSize, GLvoid *image) 117848b8605Smrg{ 118848b8605Smrg GET_CURRENT_CONTEXT(ctx); 119848b8605Smrg 120848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter"); 121848b8605Smrg} 122848b8605Smrg 123848b8605Smrg 124848b8605Smrgvoid GLAPIENTRY 125848b8605Smrg_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, 126848b8605Smrg GLvoid *image) 127848b8605Smrg{ 128848b8605Smrg _mesa_GetnConvolutionFilterARB(target, format, type, INT_MAX, image); 129848b8605Smrg} 130848b8605Smrg 131848b8605Smrg 132848b8605Smrgvoid GLAPIENTRY 133848b8605Smrg_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) 134848b8605Smrg{ 135848b8605Smrg GET_CURRENT_CONTEXT(ctx); 136848b8605Smrg 137848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameterfv"); 138848b8605Smrg} 139848b8605Smrg 140848b8605Smrg 141848b8605Smrgvoid GLAPIENTRY 142848b8605Smrg_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) 143848b8605Smrg{ 144848b8605Smrg GET_CURRENT_CONTEXT(ctx); 145848b8605Smrg 146848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameteriv"); 147848b8605Smrg} 148848b8605Smrg 149848b8605Smrg 150848b8605Smrgvoid GLAPIENTRY 151848b8605Smrg_mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, 152848b8605Smrg GLsizei rowBufSize, GLvoid *row, 153848b8605Smrg GLsizei columnBufSize, GLvoid *column, 154848b8605Smrg GLvoid *span) 155848b8605Smrg{ 156848b8605Smrg GET_CURRENT_CONTEXT(ctx); 157848b8605Smrg 158848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSeparableFilter"); 159848b8605Smrg} 160848b8605Smrg 161848b8605Smrg 162848b8605Smrgvoid GLAPIENTRY 163848b8605Smrg_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, 164848b8605Smrg GLvoid *row, GLvoid *column, GLvoid *span) 165848b8605Smrg{ 166848b8605Smrg _mesa_GetnSeparableFilterARB(target, format, type, INT_MAX, row, 167848b8605Smrg INT_MAX, column, span); 168848b8605Smrg} 169848b8605Smrg 170848b8605Smrg 171848b8605Smrgvoid GLAPIENTRY 172848b8605Smrg_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) 173848b8605Smrg{ 174848b8605Smrg GET_CURRENT_CONTEXT(ctx); 175848b8605Smrg 176848b8605Smrg _mesa_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D"); 177848b8605Smrg} 178