1GLCONVOLUTIONFILTER1D(3G)                            GLCONVOLUTIONFILTER1D(3G)
2
3
4

NAME

6       glConvolutionFilter1D - define a one-dimensional convolution filter
7
8

C SPECIFICATION

10       void glConvolutionFilter1D( GLenum target,
11                                   GLenum internalformat,
12                                   GLsizei width,
13                                   GLenum format,
14                                   GLenum type,
15                                   const GLvoid *image )
16
17

PARAMETERS

19       target          Must be GL_CONVOLUTION_1D.
20
21       internalformat  The  internal   of  the convolution filter kernel.  The
22                       allowable   values    are    GL_ALPHA,    GL_LUMINANCE,
23                       GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_RGB, and GL_RGBA.
24
25       width           The width of the pixel array referenced by image.
26
27       format          The   of the pixel data in image.  The allowable values
28                       are   GL_ALPHA,   GL_ALPHA4,   GL_ALPHA8,   GL_ALPHA12,
29                       GL_ALPHA16, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8,
30                       GL_LUMINANCE12,   GL_LUMINANCE16,   GL_LUMINANCE_ALPHA,
31                       GL_LUMINANCE4_ALPHA4,             GL_LUMINANCE6_ALPHA2,
32                       GL_LUMINANCE8_ALPHA8,            GL_LUMINANCE12_ALPHA4,
33                       GL_LUMINANCE12_ALPHA12,         GL_LUMINANCE16_ALPHA16,
34                       GL_INTENSITY,       GL_INTENSITY4,       GL_INTENSITY8,
35                       GL_INTENSITY12,  GL_INTENSITY16,  GL_R3_G3_B2,  GL_RGB,
36                       GL_RGB4,   GL_RGB5,   GL_RGB8,   GL_RGB10,    GL_RGB12,
37                       GL_RGB16,   GL_RGBA,  GL_RGBA2,  GL_RGBA4,  GL_RGB5_A1,
38                       GL_RGBA8, GL_RGB10_A2, GL_RGBA12, or GL_RGBA16.
39
40       type            The type of the pixel data  in  image.   Symbolic  con‐
41                       stants     GL_UNSIGNED_BYTE,     GL_BYTE,    GL_BITMAP,
42                       GL_UNSIGNED_SHORT, GL_SHORT,  GL_UNSIGNED_INT,  GL_INT,
43                       GL_FLOAT,                       GL_UNSIGNED_BYTE_3_3_2,
44                       GL_UNSIGNED_BYTE_2_3_3_REV,    GL_UNSIGNED_SHORT_5_6_5,
45                       GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
46                       GL_UNSIGNED_SHORT_4_4_4_4_REV,
47                       GL_UNSIGNED_SHORT_5_5_5_1,
48                       GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
49                       GL_UNSIGNED_INT_8_8_8_8_REV,
50                       GL_UNSIGNED_INT_10_10_10_2,                         and
51                       GL_UNSIGNED_INT_2_10_10_10_REV are accepted.
52
53       image           Pointer  to  a one-dimensional array of pixel data that
54                       is processed to build the convolution filter kernel.
55

DESCRIPTION

57       glConvolutionFilter1D builds a one-dimensional convolution filter  ker‐
58       nel from an array of pixels.
59
60       The  pixel  array  specified  by  width,  format,  type,  and  image is
61       extracted from memory  and  processed  just  as  if  glDrawPixels  were
62       called,  but processing stops after the final expansion to RGBA is com‐
63       pleted.
64
65       The R, G, B, and A components of each pixel are next scaled by the four
66       1D  GL_CONVOLUTION_FILTER_SCALE  parameters  and  biased by the four 1D
67       GL_CONVOLUTION_FILTER_BIAS parameters.  (The scale and bias  parameters
68       are  set  by  glConvolutionParameter using the GL_CONVOLUTION_1D target
69       and       the       names        GL_CONVOLUTION_FILTER_SCALE        and
70       GL_CONVOLUTION_FILTER_BIAS.   The  parameters themselves are vectors of
71       four values that are applied to red, green, blue, and  alpha,  in  that
72       order.)  The R, G, B, and A values are not clamped to [0,1] at any time
73       during this process.
74
75       Each pixel is then converted to the internal  specified by internalfor‐
76       mat.  This conversion simply maps the component values of the pixel (R,
77       G, B, and A) to the values included in the internal  (red, green, blue,
78       alpha, luminance, and intensity).  The mapping is as follows:
79
80
81       ────────────────────────────────────────────────────────────────────────
82       Internal Format      Red   Green   Blue   Alpha   Luminance   Intensity
83       ────────────────────────────────────────────────────────────────────────
84       GL_ALPHA                                    A
85       GL_LUMINANCE                                R
86       GL_LUMINANCE_ALPHA                  A       R
87       GL_INTENSITY                                                      R
88       GL_RGB                R      G      B
89       GL_RGBA               R      G      B       A
90       ────────────────────────────────────────────────────────────────────────
91
92       The  red, green, blue, alpha, luminance, and/or intensity components of
93       the resulting pixels are stored in floating-point rather  than  integer
94       They form a one-dimensional filter kernel image indexed with coordinate
95       i such that i starts at 0 and increases from  left  to  right.   Kernel
96       location i is derived from the ith pixel, counting from 0.
97
98       Note  that after a convolution is performed, the resulting color compo‐
99       nents     are     also     scaled      by      their      corresponding
100       GL_POST_CONVOLUTION_c_SCALE  parameters and biased by their correspond‐
101       ing GL_POST_CONVOLUTION_c_BIAS parameters (where c takes on the  values
102       RED,   GREEN,   BLUE,   and   ALPHA).   These  parameters  are  set  by
103       glPixelTransfer.
104

NOTES

106       glConvolutionFilter1D is present only  if  GL_ARB_imaging  is  returned
107       when glGetString is called with an argument of GL_EXTENSIONS.
108

ERRORS

110       GL_INVALID_ENUM is generated if target is not GL_CONVOLUTION_1D.
111
112       GL_INVALID_ENUM is generated if internalformat is not one of the allow‐
113       able values.
114
115       GL_INVALID_VALUE is generated if width is less  than  zero  or  greater
116       than  the  maximum  supported  value.   This  value may be queried with
117       glGetConvolutionParameter  using  target  GL_CONVOLUTION_1D  and   name
118       GL_MAX_CONVOLUTION_WIDTH.
119
120       GL_INVALID_ENUM is generated if format is not one of the allowable val‐
121       ues.
122
123       GL_INVALID_ENUM is generated if type is not one of the  allowable  val‐
124       ues.
125
126       GL_INVALID_OPERATION  is generated if glConvolutionFilter1D is executed
127       between the execution of glBegin and  the  corresponding  execution  of
128       glEnd.
129
130       GL_INVALID_OPERATION    is    generated    if    format   is   one   of
131       GL_UNSIGNED_BYTE_3_3_2,                     GL_UNSIGNED_BYTE_2_3_3_REV,
132       GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and type is not
133       GL_RGB.
134
135       GL_INVALID_OPERATION   is   generated   if    format    is    one    of
136       GL_UNSIGNED_SHORT_4_4_4_4,               GL_UNSIGNED_SHORT_4_4_4_4_REV,
137       GL_UNSIGNED_SHORT_5_5_5_1,               GL_UNSIGNED_SHORT_1_5_5_5_REV,
138       GL_UNSIGNED_INT_8_8_8_8,                   GL_UNSIGNED_INT_8_8_8_8_REV,
139       GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and  type
140       is neither GL_RGBA nor GL_BGRA.
141

ASSOCIATED GETS

143       glGetConvolutionParameter, glGetConvolutionFilter
144

SEE ALSO

146       glConvolutionFilter2D(3G),                     glSeparableFilter2D(3G),
147       glConvolutionParameter(3G), glPixelTransfer(3G)
148
149
150
151                                                     GLCONVOLUTIONFILTER1D(3G)
Impressum