1GLCONVOLUTIONPARAMETER(3G)                          GLCONVOLUTIONPARAMETER(3G)
2
3
4

NAME

6       glConvolutionParameterf,  glConvolutionParameteri, glConvolutionParame‐
7       terfv, glConvolutionParameteriv - set convolution parameters
8
9

C SPECIFICATION

11       void glConvolutionParameterf( GLenum target,
12                                     GLenum pname,
13                                     GLfloat params )
14       void glConvolutionParameteri( GLenum target,
15                                     GLenum pname,
16                                     GLint params )
17

PARAMETERS

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

C SPECIFICATION

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

PARAMETERS

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

DESCRIPTION

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

NOTES

96       glConvolutionParameter  is  present  only if GL_ARB_imaging is returned
97       when 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 val‐
108       ues.
109
110       GL_INVALID_ENUM is generated if pname is not one of the allowable  val‐
111       ues.
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(3G),                   glConvolutionFilter2D(3G),
126       glSeparableFilter2D(3G), glGetConvolutionParameter(3G)
127
128
129
130                                                    GLCONVOLUTIONPARAMETER(3G)
Impressum