1GLCONVOLUTIONPARAMET(3G)         OpenGL Manual        GLCONVOLUTIONPARAMET(3G)
2
3
4

NAME

6       glConvolutionParameter - set convolution parameters
7

C SPECIFICATION

9       void glConvolutionParameterf(GLenum target, GLenum pname,
10                                    GLfloat params);
11
12       void glConvolutionParameteri(GLenum target, GLenum pname,
13                                    GLint params);
14

PARAMETERS

16       target
17           The target for the convolution parameter. Must be one of
18           GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, or GL_SEPARABLE_2D.
19
20       pname
21           The parameter to be set. Must be GL_CONVOLUTION_BORDER_MODE.
22
23       params
24           The parameter value. Must be one of GL_REDUCE, GL_CONSTANT_BORDER,
25           GL_REPLICATE_BORDER.
26
27

C SPECIFICATION

29       void glConvolutionParameterfv(GLenum target, GLenum pname,
30                                     const GLfloat * params);
31
32       void glConvolutionParameteriv(GLenum target, GLenum pname,
33                                     const GLint * params);
34

PARAMETERS

36       target
37           The target for the convolution parameter. Must be one of
38           GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, or GL_SEPARABLE_2D.
39
40       pname
41           The parameter to be set. Must be one of GL_CONVOLUTION_BORDER_MODE,
42           GL_CONVOLUTION_BORDER_COLOR, GL_CONVOLUTION_FILTER_SCALE, or
43           GL_CONVOLUTION_FILTER_BIAS.
44
45       params
46           The parameter value. If pnamev is GL_CONVOLUTION_BORDER_MODE,
47           paramsv must be one of GL_REDUCE, GL_CONSTANT_BORDER, or
48           GL_REPLICATE_BORDER. Otherwise, must be a vector of four values
49           (for red, green, blue, and alpha, respectively) to be used for
50           scaling (when pnamev is GL_CONVOLUTION_FILTER_SCALE), or biasing
51           (when pnamev is GL_CONVOLUTION_FILTER_BIAS) a convolution filter
52           kernel or setting the constant border color (when pnamev is
53           GL_CONVOLUTION_BORDER_COLOR.
54

DESCRIPTION

56       glConvolutionParameter sets the value of a convolution parameter.
57
58       target selects the convolution filter to be affected:
59       GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, or GL_SEPARABLE_2D for the 1D,
60       2D, or separable 2D filter, respectively.
61
62       pname selects the parameter to be changed.  GL_CONVOLUTION_FILTER_SCALE
63       and GL_CONVOLUTION_FILTER_BIAS affect the definition of the convolution
64       filter kernel; see glConvolutionFilter1D(), glConvolutionFilter2D(),
65       and glSeparableFilter2D() for details. In these cases, paramsv is an
66       array of four values to be applied to red, green, blue, and alpha
67       values, respectively. The initial value for GL_CONVOLUTION_FILTER_SCALE
68       is (1, 1, 1, 1), and the initial value for GL_CONVOLUTION_FILTER_BIAS
69       is (0, 0, 0, 0).
70
71       A pname value of GL_CONVOLUTION_BORDER_MODE controls the convolution
72       border mode. The accepted modes are:
73
74       GL_REDUCE
75           The image resulting from convolution is smaller than the source
76           image. If the filter width is Wf and height is Hf, and the source
77           image width is Ws and height is Hs, then the convolved image width
78           will be Ws - Wf + 1 and height will be Hs - Hf + 1. (If this
79           reduction would generate an image with zero or negative width
80           and/or height, the output is simply null, with no error generated.)
81           The coordinates of the image resulting from convolution are zero
82           through Ws - Wf in width and zero through Hs - Hf in height.
83
84       GL_CONSTANT_BORDER
85           The image resulting from convolution is the same size as the source
86           image, and processed as if the source image were surrounded by
87           pixels with their color specified by the
88           GL_CONVOLUTION_BORDER_COLOR.
89
90       GL_REPLICATE_BORDER
91           The image resulting from convolution is the same size as the source
92           image, and processed as if the outermost pixel on the border of the
93           source image were replicated.
94

NOTES

96       glConvolutionParameter is present only if ARB_imaging is returned when
97       glGetString() is called with an argument of GL_EXTENSIONS.
98
99       In cases where errors can result from the specification of invalid
100       image dimensions, it is the dimensions after convolution that are
101       tested, not the dimensions of the source image. For example,
102       glTexImage1D() requires power-of-two image size. When GL_REDUCE border
103       mode is in effect, the source image must be larger than the final
104       power-of-two size by one less than the size of the 1D filter kernel.
105

ERRORS

107       GL_INVALID_ENUM is generated if target is not one of the allowable
108       values.
109
110       GL_INVALID_ENUM is generated if pname is not one of the allowable
111       values.
112
113       GL_INVALID_ENUM is generated if pname is GL_CONVOLUTION_BORDER_MODE and
114       params is not one of GL_REDUCE, GL_CONSTANT_BORDER, or
115       GL_REPLICATE_BORDER.
116
117       GL_INVALID_OPERATION is generated if glConvolutionParameter is executed
118       between the execution of glBegin() and the corresponding execution of
119       glEnd().
120

ASSOCIATED GETS

122       glGetConvolutionParameter()
123

SEE ALSO

125       glConvolutionFilter1D(), glConvolutionFilter2D(),
126       glSeparableFilter2D(), glGetConvolutionParameter()
127
129       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
130       under the SGI Free Software B License. For details, see
131       http://oss.sgi.com/projects/FreeB/.
132

AUTHORS

134       opengl.org
135
136
137
138opengl.org                        06/10/2014          GLCONVOLUTIONPARAMET(3G)
Impressum