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

NAME

6       glCopyConvolutionFilter2D - copy pixels into a two-dimensional
7       convolution filter
8

C SPECIFICATION

10       void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
11                                      GLint x, GLint y, GLsizei width,
12                                      GLsizei height);
13

PARAMETERS

15       target
16           Must be GL_CONVOLUTION_2D.
17
18       internalformat
19           The internal format of the convolution filter kernel. The allowable
20           values are GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16,
21           GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,
22           GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4,
23           GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA4,
24           GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, GL_INTENSITY,
25           GL_INTENSITY4, GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16,
26           GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10, GL_RGB12,
27           GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, GL_RGBA8,
28           GL_RGB10_A2, GL_RGBA12, or GL_RGBA16.
29
30       x, y
31           The window space coordinates of the lower-left coordinate of the
32           pixel array to copy.
33
34       width
35           The width of the pixel array to copy.
36
37       height
38           The height of the pixel array to copy.
39

DESCRIPTION

41       glCopyConvolutionFilter2D defines a two-dimensional convolution filter
42       kernel with pixels from the current GL_READ_BUFFER (rather than from
43       main memory, as is the case for glConvolutionFilter2D()).
44
45       The screen-aligned pixel rectangle with lower-left corner at (x,\ y),
46       width width and height height is used to define the convolution filter.
47       If any pixels within this region are outside the window that is
48       associated with the GL context, the values obtained for those pixels
49       are undefined.
50
51       The pixels in the rectangle are processed exactly as if glReadPixels()
52       had been called with format set to RGBA, but the process stops just
53       before final conversion. The R, G, B, and A components of each pixel
54       are next scaled by the four 2D GL_CONVOLUTION_FILTER_SCALE parameters
55       and biased by the four 2D GL_CONVOLUTION_FILTER_BIAS parameters. (The
56       scale and bias parameters are set by glConvolutionParameter() using the
57       GL_CONVOLUTION_2D target and the names GL_CONVOLUTION_FILTER_SCALE and
58       GL_CONVOLUTION_FILTER_BIAS. The parameters themselves are vectors of
59       four values that are applied to red, green, blue, and alpha, in that
60       order.) The R, G, B, and A values are not clamped to [0,1] at any time
61       during this process.
62
63       Each pixel is then converted to the internal format specified by
64       internalformat. This conversion simply maps the component values of the
65       pixel (R, G, B, and A) to the values included in the internal format
66       (red, green, blue, alpha, luminance, and intensity). The mapping is as
67       follows:
68
69       ┌─────────────────────────────────┬─────────────────────────────┬───────────────────────────────┬──────────────────────────────┬───────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┐
70       │                                 │                             │                               │                              │                               │                                   │                                   │
71Internal Red Green Blue Alpha Luminance Intensity 
72Format                           │                             │                               │                              │                               │                                   │                                   │
73       │                                 │                             │                               │                              │                               │                                   │                                   │
74       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
75GL_ALPHA                         │                             │                               │                              │               A               │                                   │                                   │
76       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
77GL_LUMINANCE                     │                             │                               │                              │                               │                 R                 │                                   │
78       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
79GL_LUMINANCE_ALPHA               │                             │                               │                              │               A               │                 R                 │                                   │
80       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
81GL_INTENSITY                     │                             │                               │                              │                               │                                   │                 R                 │
82       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
83GL_RGB                           │              R              │               G               │              B               │                               │                                   │                                   │
84       ├─────────────────────────────────┼─────────────────────────────┼───────────────────────────────┼──────────────────────────────┼───────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
85GL_RGBA                          │              R              │               G               │              B               │               A               │                                   │                                   │
86       └─────────────────────────────────┴─────────────────────────────┴───────────────────────────────┴──────────────────────────────┴───────────────────────────────┴───────────────────────────────────┴───────────────────────────────────┘
87
88       The red, green, blue, alpha, luminance, and/or intensity components of
89       the resulting pixels are stored in floating-point rather than integer
90       format.
91
92       Pixel ordering is such that lower x screen coordinates correspond to
93       lower i filter image coordinates, and lower y screen coordinates
94       correspond to lower j filter image coordinates.
95
96       Note that after a convolution is performed, the resulting color
97       components are also scaled by their corresponding
98       GL_POST_CONVOLUTION_c_SCALE parameters and biased by their
99       corresponding GL_POST_CONVOLUTION_c_BIAS parameters (where c takes on
100       the values RED, GREEN, BLUE, and ALPHA). These parameters are set by
101       glPixelTransfer().
102

NOTES

104       glCopyConvolutionFilter2D is present only if ARB_imaging is returned
105       when glGetString() is called with an argument of GL_EXTENSIONS.
106

ERRORS

108       GL_INVALID_ENUM is generated if target is not GL_CONVOLUTION_2D.
109
110       GL_INVALID_ENUM is generated if internalformat is not one of the
111       allowable values.
112
113       GL_INVALID_VALUE is generated if width is less than zero or greater
114       than the maximum supported value. This value may be queried with
115       glGetConvolutionParameter() using target GL_CONVOLUTION_2D and name
116       GL_MAX_CONVOLUTION_WIDTH.
117
118       GL_INVALID_VALUE is generated if height is less than zero or greater
119       than the maximum supported value. This value may be queried with
120       glGetConvolutionParameter() using target GL_CONVOLUTION_2D and name
121       GL_MAX_CONVOLUTION_HEIGHT.
122
123       GL_INVALID_OPERATION is generated if glCopyConvolutionFilter2D is
124       executed between the execution of glBegin() and the corresponding
125       execution of glEnd().
126

ASSOCIATED GETS

128       glGetConvolutionParameter(), glGetConvolutionFilter()
129

SEE ALSO

131       glConvolutionFilter2D(), glConvolutionParameter(), glPixelTransfer()
132
134       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
135       under the SGI Free Software B License. For details, see
136       http://oss.sgi.com/projects/FreeB/.
137

AUTHORS

139       opengl.org
140
141
142
143opengl.org                        06/10/2014          GLCOPYCONVOLUTIONFIL(3G)
Impressum