<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glCopyConvolutionFilter1D</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glCopyColorTable.3G.xml" title="glCopyColorTable"/><link rel="next" href="glCopyConvolutionFilter2D.3G.xml" title="glCopyConvolutionFilter2D"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glCopyConvolutionFilter1D</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glCopyColorTable.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glCopyConvolutionFilter2D.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glCopyConvolutionFilter1D.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glCopyConvolutionFilter1D.3G-name"/><h2>Name</h2><p>glCopyConvolutionFilter1D &#8212; copy pixels into a one-dimensional convolution filter</p></div><div class="refsynopsisdiv"><a name="glCopyConvolutionFilter1D.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glCopyConvolutionFilter1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLenum <i><tt>internalformat</tt></i>, GLint <i><tt>x</tt></i>, GLint <i><tt>y</tt></i>, GLsizei <i><tt>width</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glCopyConvolutionFilter1D.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glCopyConvolutionFilter1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>internalformat</tt></i>, <i><tt>x</tt></i>, <i><tt>y</tt></i>, <i><tt>width</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						Must be <tt>GL_CONVOLUTION_1D</tt>.
					</dd><dt><span class="term"><i><tt>internalformat</tt></i></span></dt><dd>
						The internal of the convolution filter kernel. The allowable values are <tt>GL_ALPHA</tt>,
						<tt>GL_ALPHA4</tt>, <tt>GL_ALPHA8</tt>, <tt>GL_ALPHA12</tt>,
						<tt>GL_ALPHA16</tt>, <tt>GL_LUMINANCE</tt>, <tt>GL_LUMINANCE4</tt>,
						<tt>GL_LUMINANCE8</tt>, <tt>GL_LUMINANCE12</tt>,
						<tt>GL_LUMINANCE16</tt>, <tt>GL_LUMINANCE_ALPHA</tt>,
						<tt>GL_LUMINANCE4_ALPHA4</tt>, <tt>GL_LUMINANCE6_ALPHA2</tt>,
						<tt>GL_LUMINANCE8_ALPHA8</tt>, <tt>GL_LUMINANCE12_ALPHA4</tt>,
						<tt>GL_LUMINANCE12_ALPHA12</tt>, <tt>GL_LUMINANCE16_ALPHA16</tt>,
						<tt>GL_INTENSITY</tt>, <tt>GL_INTENSITY4</tt>, <tt>GL_INTENSITY8</tt>,
						<tt>GL_INTENSITY12</tt>, <tt>GL_INTENSITY16</tt>, <tt>GL_R3_G3_B2</tt>,
						<tt>GL_RGB</tt>, <tt>GL_RGB4</tt>, <tt>GL_RGB5</tt>,
						<tt>GL_RGB8</tt>, <tt>GL_RGB10</tt>, <tt>GL_RGB12</tt>,
						<tt>GL_RGB16</tt>, <tt>GL_RGBA</tt>, <tt>GL_RGBA2</tt>,
						<tt>GL_RGBA4</tt>, <tt>GL_RGB5_A1</tt>, <tt>GL_RGBA8</tt>,
						<tt>GL_RGB10_A2</tt>, <tt>GL_RGBA12</tt>, or <tt>GL_RGBA16</tt>.
					</dd><dt><span class="term"><i><tt>x</tt></i>, <i><tt>y</tt></i></span></dt><dd>
						The window space coordinates of the lower-left coordinate of the pixel array to copy.
					</dd><dt><span class="term"><i><tt>width</tt></i></span></dt><dd>
						The width of the pixel array to copy.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-description"/><h2>Description</h2><p>
			<tt>glCopyConvolutionFilter1D</tt> defines a one-dimensional convolution filter kernel with pixels from the
			current <tt>GL_READ_BUFFER</tt> (rather than from main memory, as is the case for <a href="glConvolutionFilter1D.3G.xml"><tt>glConvolutionFilter1D</tt></a>). The screen-aligned pixel rectangle with lower-left corner at
			(<i><tt>x</tt></i>,<i><tt>y</tt></i>), width <i><tt>width</tt></i> and height 1 is used to define
			the convolution filter. 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 in the rectangle are processed exactly as if <a href="glReadPixels.3G.xml"><tt>glReadPixels</tt></a> had been called with <i><tt>format</tt></i> set to RGBA, but the
			process stops just before final conversion. The R, G, B, and A components of each pixel are next scaled by the four 1D
			<tt>GL_CONVOLUTION_FILTER_SCALE</tt> parameters and biased by the four 1D
			<tt>GL_CONVOLUTION_FILTER_BIAS</tt> parameters. (The scale and bias parameters are set by <tt>glConvolutionParameter</tt> using the <tt>GL_CONVOLUTION_1D</tt> target and the
			names <tt>GL_CONVOLUTION_FILTER_SCALE</tt> and <tt>GL_CONVOLUTION_FILTER_BIAS</tt>. The
			parameters themselves are vectors of four values that are applied to red, green, blue, and alpha, in that order.) The
			R, G, B, and A values are not clamped to [0,1] at any time during this process. Each pixel is then converted to the
			internal specified by <i><tt>internalformat</tt></i>. This conversion simply maps the component values of the
			pixel (R, G, B, and A) to the values included in the internal (red, green, blue, alpha, luminance, and intensity). The
			mapping is as follows:
		</p><div class="informaltable"><table border="1"><colgroup><col/><col align="center"/><col align="center"/><col align="center"/><col align="center"/><col align="center"/><col align="center"/></colgroup><thead><tr><th><span class="bold"><b>Internal Format</b></span></th><th align="center"><span class="bold"><b>Red</b></span></th><th align="center"><span class="bold"><b>Green</b></span></th><th align="center"><span class="bold"><b>Blue</b></span></th><th align="center"><span class="bold"><b>Alpha</b></span></th><th align="center"><span class="bold"><b>Luminance</b></span></th><th align="center"><span class="bold"><b>Intensity</b></span></th></tr></thead><tbody><tr><td><tt>GL_ALPHA</tt></td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center">A</td><td align="center"> </td><td align="center"> </td></tr><tr><td><tt>GL_LUMINANCE</tt></td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center">R</td><td align="center"> </td><td align="center"> </td></tr><tr><td><tt>GL_LUMINANCE_ALPHA</tt></td><td align="center"> </td><td align="center"> </td><td align="center">A</td><td align="center">R</td><td align="center"> </td><td align="center"> </td></tr><tr><td><tt>GL_INTENSITY</tt></td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center">R</td></tr><tr><td><tt>GL_RGB</tt></td><td align="center">R</td><td align="center">G</td><td align="center">B</td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr><tr><td><tt>GL_RGBA</tt></td><td align="center">R</td><td align="center">G</td><td align="center">B</td><td align="center">A</td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div><p>
			The red, green, blue, alpha, luminance, and/or intensity components of the resulting pixels are stored in
			floating-point rather than integer Pixel ordering is such that lower x screen coordinates correspond to lower
			<i><tt>i</tt></i> filter image coordinates.
		</p><p>
			Note that after a convolution is performed, the resulting color components are also scaled by their corresponding
			<tt>GL_POST_CONVOLUTION_c_SCALE</tt> parameters and biased by their corresponding
			<tt>GL_POST_CONVOLUTION_c_BIAS</tt> parameters (where <i><tt>c</tt></i> takes on the values
			<tt>RED</tt>, <tt>GREEN</tt>, <tt>BLUE</tt>, and <tt>ALPHA</tt>). These
			parameters are set by <tt>glPixelTransfer</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-notes"/><h2>Notes</h2><p>
			<tt>glCopyConvolutionFilter1D</tt> is present only if <tt>GL_ARB_imaging</tt> is returned when
			<a href="glGetString.3G.xml"><tt>glGetString</tt></a> is called with an argument of <tt>GL_EXTENSIONS</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>target</tt></i> is not
			<tt>GL_CONVOLUTION_1D</tt>.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>internalformat</tt></i> is not one of the allowable
			values.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>width</tt></i> is less than zero or greater than
			the maximum supported value. This value may be queried with <tt>glGetConvolutionParameter</tt> using target <tt>GL_CONVOLUTION_1D</tt> and name
			<tt>GL_MAX_CONVOLUTION_WIDTH</tt>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glCopyConvolutionFilter1D</tt> is executed
			between the execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGetConvolutionParameter</tt>, <a href="glGetConvolutionFilter.3G.xml"><tt>glGetConvolutionFilter</tt></a>
		</p></div><div class="refsect1" lang="en"><a name="glCopyConvolutionFilter1D.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glConvolutionFilter1D.3G.xml">glConvolutionFilter1D</a>, <a href="glConvolutionParameter.3G.xml">glConvolutionParameter</a>, <a href="glPixelTransfer.3G.xml">glPixelTransfer</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glCopyColorTable.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glCopyConvolutionFilter2D.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glCopyColorTable </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glCopyConvolutionFilter2D</td></tr></table></div></body></html>
