GLCOPYCONVOLUTIONFILTEREXT(3GL)GLCOPYCONVOLUTIONFILTEREXT(3GL)NAME
glCopyConvolutionFilter1DEXT, glCopyConvolutionFilter2DEXT - copy pix‐
els into convolution filter image
C SPECIFICATION
void glCopyConvolutionFilter1DEXT ( GLenum target,
GLenum internalformat,
GLint x,
GLint y,
GLsizei width)
void glCopyConvolutionFilter2DEXT ( GLenum target,
GLenum internalformat,
GLint x,
GLint y,
GLsizei width,
GLsizei height)
PARAMETERS
target The target Convolution filter. Must be GL_CONVOLU‐
TION_1D_EXT for glCopyConvolutionFilter1DEXT and
GL_CONVOLUTION_2D_EXT for glCopyConvolutionFilter2DEXT.
internalformat The internal storage format of the convolution filter.
Must be one of GL_ALPHA, GL_LUMINANCE, GL_LUMI‐
NANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA.
x The x coordinate of the lower-left corner of the pixel
rectangle to be transferred to the convolution filter.
y The y coordinate of the lower-left corner of the pixel
rectangle to be transferred to the convolution filter.
width The width of the pixel rectangle.
height The height of the pixel rectangle.
DESCRIPTION
glCopyConvolutionFilter1DEXT and glCopyConvolutionFilter2DEXT are part
of the GL_EXT_convolution extension, which adds convolution to the
pixel transfer path.
These functions allow defining convolution filters using image data in
the framebuffer. Rather than accepting image data from memory, they
copy image data from the color buffer specified by the current Read‐
Buffer (GL_READ_BUFFER) mode.
glCopyConvolutionFilter2DEXT accepts image data from a <width> pixel
wide by <height> pixel high color buffer region whose lower-left pixel
has window coordinates <x>,<y>. If any pixels within this region are
outside the window that is associated with the GL context, the values
obtained for those pixels are undefined.
These pixel values are obtained from the framebuffer exactly as if
glReadPixels had been called with <format> set to RGBA, with processing
continuing through conversion of RGBA values. At this point all pixel
component values are treated exactly as if glConvolutionFilter2DEXT had
been called. Pixel ordering is such that lower X screen coordinates
correspond to lower i filter image coordinates, and lower Y screen
coordinates correspond to lower j filter image coordinates.
glCopyConvolutionFilter1DEXT accepts image data from a <width> pixel
wide by 1 pixel high color buffer region whose left-most pixel has win‐
dow coordinates <x>,<y>. If any pixels within this region are outside
the window that is associated with the GL context, the values obtained
for those pixels are undefined. The pixels are processed just as those
of glCopyConvolutionFilter2DEXT are, and they define a filter image
such that lower X window coordinates correspond to lower i filter image
coordinates.
The four scale parameters and the four bias parameters that are
defined for the filter image are then used to scale and bias the R,
G, B, and A components of each pixel. Use glConvolutionParame‐
ter[i|f]vEXT to set these scale and bias parameters.
Each pixel is then converted to the internal format specified by inter‐
nalformat. This conversion simply maps the component values of the
pixel (R, G, B, and A) to the values included in the internal format
(red, green, blue, alpha, luminance, and intensity). The mapping is as
follows:
----------------------------------------------------------------------
|Base Stored values |
|Internal Format Red Green Blue Alpha Luminance Intensity|
|____________________________________________________________________|
| |
|GL_ALPHA A |
|GL_LUMINANCE R |
|GL_LUMINANCE_ALPHA A R |
|GL_INTENSITY R |
|GL_RGB R G B |
|GL_RGBA R G B A |
----------------------------------------------------------------------
ERRORS
GL_INVALID_ENUM is generated if target is not one of the acceptable
values.
GL_INVALID_ENUM is generated if internalformat is not one of the
acceptable values.
GL_INVALID_VALUE is generated if width, height, x, or y is less than
zero.
ASSOCIATED GETS
glGetConvolutionFilterEXT and glGetSeparableFilterEXT
SEE ALSO
glConvolutionFilter1DEXT, glConvolutionFilter2DEXT, glSeparable‐
Filter2DEXT, glConvolutionParameteriEXT, glConvolutionParameterivEXT,
glConvolutionParameterfEXT, glConvolutionParameterfvEXT, glGetConvolu‐
tionParameterivEXT, glGetConvolutionParameterfvEXT, glTexImage1D,
glGetTexImage, glDrawPixels, glCopyPixels, glReadPixels, glTexImage2D,
glTexSubImage2DEXT, glCopyTexImage2DEXT, glCopyTexSubImage2DEXT, glPix‐
elTransferf, glPixelTransferi, glGetTexImage, glEnable, glDisable,
glIsEnabled.
1 Dec 97 GLCOPYCONVOLUTIONFILTEREXT(3GL)