17117f1b4Smrg/* 27117f1b4Smrg * Mesa 3-D graphics library 37117f1b4Smrg * 47117f1b4Smrg * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 57117f1b4Smrg * 67117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a 77117f1b4Smrg * copy of this software and associated documentation files (the "Software"), 87117f1b4Smrg * to deal in the Software without restriction, including without limitation 97117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 107117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the 117117f1b4Smrg * Software is furnished to do so, subject to the following conditions: 127117f1b4Smrg * 137117f1b4Smrg * The above copyright notice and this permission notice shall be included 147117f1b4Smrg * in all copies or substantial portions of the Software. 157117f1b4Smrg * 167117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 177117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 187117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20af69d88dSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21af69d88dSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22af69d88dSmrg * OTHER DEALINGS IN THE SOFTWARE. 237117f1b4Smrg */ 247117f1b4Smrg 257117f1b4Smrg 267117f1b4Smrg/* 277117f1b4Smrg * Image convolution functions. 287117f1b4Smrg * 297117f1b4Smrg * Notes: filter kernel elements are indexed by <n> and <m> as in 307117f1b4Smrg * the GL spec. 317117f1b4Smrg */ 327117f1b4Smrg 337117f1b4Smrg 347117f1b4Smrg#include "glheader.h" 3501e04c3fSmrg#include "context.h" 367117f1b4Smrg#include "convolve.h" 374a49301eSmrg 384a49301eSmrg 39af69d88dSmrgvoid GLAPIENTRY 407117f1b4Smrg_mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) 417117f1b4Smrg{ 427117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 437117f1b4Smrg 44af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D"); 457117f1b4Smrg} 467117f1b4Smrg 47af69d88dSmrgvoid GLAPIENTRY 487117f1b4Smrg_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) 497117f1b4Smrg{ 507117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 517117f1b4Smrg 52af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D"); 537117f1b4Smrg} 547117f1b4Smrg 557117f1b4Smrg 56af69d88dSmrgvoid GLAPIENTRY 577117f1b4Smrg_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) 587117f1b4Smrg{ 597117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 607117f1b4Smrg 61af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterf"); 627117f1b4Smrg} 637117f1b4Smrg 647117f1b4Smrg 65af69d88dSmrgvoid GLAPIENTRY 667117f1b4Smrg_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) 677117f1b4Smrg{ 687117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 697117f1b4Smrg 70af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterfv"); 717117f1b4Smrg} 727117f1b4Smrg 737117f1b4Smrg 74af69d88dSmrgvoid GLAPIENTRY 757117f1b4Smrg_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) 767117f1b4Smrg{ 777117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 787117f1b4Smrg 79af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteri"); 807117f1b4Smrg} 817117f1b4Smrg 827117f1b4Smrg 83af69d88dSmrgvoid GLAPIENTRY 847117f1b4Smrg_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) 857117f1b4Smrg{ 867117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 877117f1b4Smrg 88af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteriv"); 897117f1b4Smrg} 907117f1b4Smrg 917117f1b4Smrg 92af69d88dSmrgvoid GLAPIENTRY 937117f1b4Smrg_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width) 947117f1b4Smrg{ 957117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 967117f1b4Smrg 97af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter1D"); 987117f1b4Smrg} 997117f1b4Smrg 1007117f1b4Smrg 101af69d88dSmrgvoid GLAPIENTRY 1027117f1b4Smrg_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height) 1037117f1b4Smrg{ 1047117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 1057117f1b4Smrg 106af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter2D"); 1073464ebd5Sriastradh} 1087117f1b4Smrg 1097117f1b4Smrg 110af69d88dSmrgvoid GLAPIENTRY 1113464ebd5Sriastradh_mesa_GetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, 1123464ebd5Sriastradh GLsizei bufSize, GLvoid *image) 1133464ebd5Sriastradh{ 1143464ebd5Sriastradh GET_CURRENT_CONTEXT(ctx); 1154a49301eSmrg 1163464ebd5Sriastradh _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter"); 1177117f1b4Smrg} 1187117f1b4Smrg 1197117f1b4Smrg 120af69d88dSmrgvoid GLAPIENTRY 1217117f1b4Smrg_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, 1227117f1b4Smrg GLvoid *image) 1237117f1b4Smrg{ 1243464ebd5Sriastradh _mesa_GetnConvolutionFilterARB(target, format, type, INT_MAX, image); 1257117f1b4Smrg} 1267117f1b4Smrg 1277117f1b4Smrg 128af69d88dSmrgvoid GLAPIENTRY 1297117f1b4Smrg_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) 1307117f1b4Smrg{ 1317117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 1327117f1b4Smrg 133af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameterfv"); 1347117f1b4Smrg} 1357117f1b4Smrg 1367117f1b4Smrg 137af69d88dSmrgvoid GLAPIENTRY 1387117f1b4Smrg_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) 1397117f1b4Smrg{ 1407117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 1417117f1b4Smrg 142af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameteriv"); 1437117f1b4Smrg} 1447117f1b4Smrg 1457117f1b4Smrg 146af69d88dSmrgvoid GLAPIENTRY 1473464ebd5Sriastradh_mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, 1483464ebd5Sriastradh GLsizei rowBufSize, GLvoid *row, 1493464ebd5Sriastradh GLsizei columnBufSize, GLvoid *column, 1503464ebd5Sriastradh GLvoid *span) 1517117f1b4Smrg{ 1527117f1b4Smrg GET_CURRENT_CONTEXT(ctx); 1537117f1b4Smrg 154af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSeparableFilter"); 1557117f1b4Smrg} 1567117f1b4Smrg 1577117f1b4Smrg 158af69d88dSmrgvoid GLAPIENTRY 1593464ebd5Sriastradh_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, 1603464ebd5Sriastradh GLvoid *row, GLvoid *column, GLvoid *span) 1617117f1b4Smrg{ 1623464ebd5Sriastradh _mesa_GetnSeparableFilterARB(target, format, type, INT_MAX, row, 1633464ebd5Sriastradh INT_MAX, column, span); 1647117f1b4Smrg} 1657117f1b4Smrg 1667117f1b4Smrg 167af69d88dSmrgvoid GLAPIENTRY 1683464ebd5Sriastradh_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) 1697117f1b4Smrg{ 1703464ebd5Sriastradh GET_CURRENT_CONTEXT(ctx); 1717117f1b4Smrg 172af69d88dSmrg _mesa_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D"); 1734a49301eSmrg} 174