GLCONVOLUTIONPARAMETER(3G) | GLCONVOLUTIONPARAMETER(3G) |
glConvolutionParameterf, glConvolutionParameteri, glConvolutionParameterfv, glConvolutionParameteriv - set convolution parameters
void glConvolutionParameterf( GLenum target,
GLenum pname, GLfloat params )
void glConvolutionParameteri( GLenum target,
GLenum pname, GLint params )
void glConvolutionParameterfv( GLenum target,
GLenum pname, const GLfloat *params )
void glConvolutionParameteriv( GLenum target,
GLenum pname, const GLint *params )
glConvolutionParameter sets the value of a convolution parameter.
target selects the convolution filter to be affected: GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, or GL_SEPARABLE_2D for the 1D, 2D, or separable 2D filter, respectively.
pname selects the parameter to be changed. GL_CONVOLUTION_FILTER_SCALE and GL_CONVOLUTION_FILTER_BIAS affect the definition of the convolution filter kernel; see glConvolutionFilter1D, glConvolutionFilter2D, and glSeparableFilter2D for details. In these cases, params is an array of four values to be applied to red, green, blue, and alpha values, respectively. The initial value for GL_CONVOLUTION_FILTER_SCALE is (1, 1, 1, 1), and the initial value for GL_CONVOLUTION_FILTER_BIAS is (0, 0, 0, 0).
A pname value of GL_CONVOLUTION_BORDER_MODE controls the convolution border mode. The accepted modes are:
glConvolutionParameter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS.
In cases where errors can result from the specification of invalid image dimensions, it is the dimensions after convolution that are tested, not the dimensions of the source image. For example, glTexImage1D requires power-of-two image size. When GL_REDUCE border mode is in effect, the source image must be larger than the final power-of-two size by one less than the size of the 1D filter kernel.
GL_INVALID_ENUM is generated if target is not one of the allowable values.
GL_INVALID_ENUM is generated if pname is not one of the allowable values.
GL_INVALID_ENUM is generated if pname is GL_CONVOLUTION_BORDER_MODE and params is not one of GL_REDUCE, GL_CONSTANT_BORDER, or GL_REPLICATE_BORDER.
GL_INVALID_OPERATION is generated if glConvolutionParameter is executed between the execution of glBegin and the corresponding execution of glEnd.
glGetConvolutionParameter
glConvolutionFilter1D, glConvolutionFilter2D, glSeparableFilter2D, glGetConvolutionParameter