rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glCopyConvolutionFilter1D.xml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glCopyConvolutionFilter1D</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glCopyConvolutionFilter1D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glCopyConvolutionFilter1D — copy pixels into a one-dimensional convolution filter</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glCopyConvolutionFilter1D</b>(</code></td><td>GLenum  </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">internalformat</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">width</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
4 Must be <code class="constant">GL_CONVOLUTION_1D</code>.
5 </p></dd><dt><span class="term"><em class="parameter"><code>internalformat</code></em></span></dt><dd><p>
6 The internal format of the convolution filter kernel.
7 The allowable values are
8 <code class="constant">GL_ALPHA</code>,
9 <code class="constant">GL_ALPHA4</code>,
10 <code class="constant">GL_ALPHA8</code>,
11 <code class="constant">GL_ALPHA12</code>,
12 <code class="constant">GL_ALPHA16</code>,
13 <code class="constant">GL_LUMINANCE</code>,
14 <code class="constant">GL_LUMINANCE4</code>,
15 <code class="constant">GL_LUMINANCE8</code>,
16 <code class="constant">GL_LUMINANCE12</code>,
17 <code class="constant">GL_LUMINANCE16</code>,
18 <code class="constant">GL_LUMINANCE_ALPHA</code>,
19 <code class="constant">GL_LUMINANCE4_ALPHA4</code>,
20 <code class="constant">GL_LUMINANCE6_ALPHA2</code>,
21 <code class="constant">GL_LUMINANCE8_ALPHA8</code>,
22 <code class="constant">GL_LUMINANCE12_ALPHA4</code>,
23 <code class="constant">GL_LUMINANCE12_ALPHA12</code>,
24 <code class="constant">GL_LUMINANCE16_ALPHA16</code>,
25 <code class="constant">GL_INTENSITY</code>,
26 <code class="constant">GL_INTENSITY4</code>,
27 <code class="constant">GL_INTENSITY8</code>,
28 <code class="constant">GL_INTENSITY12</code>,
29 <code class="constant">GL_INTENSITY16</code>,
30 <code class="constant">GL_R3_G3_B2</code>,
31 <code class="constant">GL_RGB</code>,
32 <code class="constant">GL_RGB4</code>,
33 <code class="constant">GL_RGB5</code>,
34 <code class="constant">GL_RGB8</code>,
35 <code class="constant">GL_RGB10</code>,
36 <code class="constant">GL_RGB12</code>,
37 <code class="constant">GL_RGB16</code>,
38 <code class="constant">GL_RGBA</code>,
39 <code class="constant">GL_RGBA2</code>,
40 <code class="constant">GL_RGBA4</code>,
41 <code class="constant">GL_RGB5_A1</code>,
42 <code class="constant">GL_RGBA8</code>,
43 <code class="constant">GL_RGB10_A2</code>,
44 <code class="constant">GL_RGBA12</code>, or
45 <code class="constant">GL_RGBA16</code>.
46 </p></dd><dt><span class="term"><em class="parameter"><code>x</code></em>, </span><span class="term"><em class="parameter"><code>y</code></em></span></dt><dd><p>
47 The window space coordinates of the lower-left coordinate of the
48 pixel array to copy.
49 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
50 The width of the pixel array to copy.
51 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
52 <code class="function">glCopyConvolutionFilter1D</code> defines a one-dimensional convolution filter kernel with pixels
53 from the current <code class="constant">GL_READ_BUFFER</code> (rather than from main memory,
54 as is the case for <a class="citerefentry" href="glConvolutionFilter1D.xml"><span class="citerefentry"><span class="refentrytitle">glConvolutionFilter1D</span></span></a>).
55 </p><p>
56 The screen-aligned pixel rectangle with lower-left corner at (<em class="parameter"><code>x</code></em>,\ <em class="parameter"><code>y</code></em>),
57 width <em class="parameter"><code>width</code></em> and height 1 is used to define
58 the convolution filter. If any pixels within this region are
59 outside the window that is associated with the GL context, the
60 values obtained for those pixels are undefined.
61 </p><p>
62 The pixels in the rectangle are processed exactly as if <a class="citerefentry" href="glReadPixels.xml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>
63 had been called with <span class="emphasis"><em>format</em></span>
64 set to RGBA, but the process stops just before final conversion.
65 The R, G, B, and A components of each pixel are next scaled by the four
66 1D <code class="constant">GL_CONVOLUTION_FILTER_SCALE</code> parameters and biased by the
67 four 1D <code class="constant">GL_CONVOLUTION_FILTER_BIAS</code> parameters.
68 (The scale and bias parameters are set by <a class="citerefentry" href="glConvolutionParameter.xml"><span class="citerefentry"><span class="refentrytitle">glConvolutionParameter</span></span></a>
69 using the <code class="constant">GL_CONVOLUTION_1D</code> target and the names
70 <code class="constant">GL_CONVOLUTION_FILTER_SCALE</code> and <code class="constant">GL_CONVOLUTION_FILTER_BIAS</code>.
71 The parameters themselves are vectors of four values that are applied to red,
72 green, blue, and alpha, in that order.)
73 The R, G, B, and A values are not clamped to [0,1] at any time during this
74 process.
75 </p><p>
76 Each pixel is then converted to the internal format specified by
77 <em class="parameter"><code>internalformat</code></em>.
78 This conversion simply maps the component values of the pixel (R, G, B,
79 and A) to the values included in the internal format (red, green, blue,
80 alpha, luminance, and intensity). The mapping is as follows:
81 </p><p>
82 </p><div class="informaltable"><table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="center" /><col align="center" /><col align="center" /><col align="center" /></colgroup><thead><tr><th align="left"><span class="bold"><strong>
83 Internal Format
84 </strong></span></th><th align="center"><span class="bold"><strong>
85 Red
86 </strong></span></th><th align="center"><span class="bold"><strong>
87 Green
88 </strong></span></th><th align="center"><span class="bold"><strong>
89 Blue
90 </strong></span></th><th align="center"><span class="bold"><strong>
91 Alpha
92 </strong></span></th><th align="center"><span class="bold"><strong>
93 Luminance
94 </strong></span></th><th align="center"><span class="bold"><strong>
95 Intensity
96 </strong></span></th></tr></thead><tbody><tr><td align="left">
97 <code class="constant">GL_ALPHA</code>
98 </td><td align="center">
99 </td><td align="center">
100 </td><td align="center">
101 </td><td align="center">
102 A
103 </td><td align="center">
104 </td><td align="center">
105
106 </td></tr><tr><td align="left">
107 <code class="constant">GL_LUMINANCE</code>
108 </td><td align="center">
109 </td><td align="center">
110 </td><td align="center">
111 </td><td align="center">
112 </td><td align="center">
113 R
114 </td><td align="center">
115
116 </td></tr><tr><td align="left">
117 <code class="constant">GL_LUMINANCE_ALPHA</code>
118 </td><td align="center">
119 </td><td align="center">
120 </td><td align="center">
121 </td><td align="center">
122 A
123 </td><td align="center">
124 R
125 </td><td align="center">
126
127 </td></tr><tr><td align="left">
128 <code class="constant">GL_INTENSITY</code>
129 </td><td align="center">
130 </td><td align="center">
131 </td><td align="center">
132 </td><td align="center">
133 </td><td align="center">
134 </td><td align="center">
135 R
136 </td></tr><tr><td align="left">
137 <code class="constant">GL_RGB</code>
138 </td><td align="center">
139 R
140 </td><td align="center">
141 G
142 </td><td align="center">
143 B
144 </td><td align="center">
145 </td><td align="center">
146 </td><td align="center">
147
148 </td></tr><tr><td align="left">
149 <code class="constant">GL_RGBA</code>
150 </td><td align="center">
151 R
152 </td><td align="center">
153 G
154 </td><td align="center">
155 B
156 </td><td align="center">
157 A
158 </td><td align="center">
159 </td><td align="center">
160
161 </td></tr></tbody></table></div><p>
162 The red, green, blue, alpha, luminance, and/or intensity components of
163 the resulting pixels are stored in floating-point rather than integer
164 format.
165 </p><p>
166 Pixel ordering is such that lower x screen coordinates correspond to
167 lower <span class="emphasis"><em>i</em></span> filter image coordinates.
168 </p><p>
169 Note that after a convolution is performed, the resulting color
170 components are also scaled by their corresponding
171 <code class="constant">GL_POST_CONVOLUTION_c_SCALE</code> parameters and biased by their
172 corresponding <code class="constant">GL_POST_CONVOLUTION_c_BIAS</code> parameters (where
173 <span class="emphasis"><em>c</em></span> takes on the values <span class="bold"><strong>RED</strong></span>, <span class="bold"><strong>GREEN</strong></span>, <span class="bold"><strong>BLUE</strong></span>, and
174 <span class="bold"><strong>ALPHA</strong></span>).
175 These parameters are set by <a class="citerefentry" href="glPixelTransfer.xml"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>.
176 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
177 <code class="function">glCopyConvolutionFilter1D</code> is present only if <code class="code">ARB_imaging</code> is returned when <a class="citerefentry" href="glGetString.xml"><span class="citerefentry"><span class="refentrytitle">glGetString</span></span></a>
178 is called with an argument of <code class="constant">GL_EXTENSIONS</code>.
179 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
180 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not
181 <code class="constant">GL_CONVOLUTION_1D</code>.
182 </p><p>
183 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>internalformat</code></em> is not one of the
184 allowable values.
185 </p><p>
186 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> is less than zero or greater
187 than the maximum supported value.
188 This value may be queried with <a class="citerefentry" href="glGetConvolutionParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetConvolutionParameter</span></span></a>
189 using target <code class="constant">GL_CONVOLUTION_1D</code> and name
190 <code class="constant">GL_MAX_CONVOLUTION_WIDTH</code>.
191 </p><p>
192 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glCopyConvolutionFilter1D</code> is executed
193 between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding
194 execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
195 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
196 <a class="citerefentry" href="glGetConvolutionParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetConvolutionParameter</span></span></a>, <a class="citerefentry" href="glGetConvolutionFilter.xml"><span class="citerefentry"><span class="refentrytitle">glGetConvolutionFilter</span></span></a>
197 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
198 <a class="citerefentry" href="glConvolutionFilter1D.xml"><span class="citerefentry"><span class="refentrytitle">glConvolutionFilter1D</span></span></a>,
199 <a class="citerefentry" href="glConvolutionParameter.xml"><span class="citerefentry"><span class="refentrytitle">glConvolutionParameter</span></span></a>,
200 <a class="citerefentry" href="glPixelTransfer.xml"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>
201 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
202 Copyright <span class="trademark"></span>© 1991-2006
203 Silicon Graphics, Inc. This document is licensed under the SGI
204 Free Software B License. For details, see
205 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
206 </p></div></div></body></html>