rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glCopyConvolutionFilter1D.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4<refentry id="glCopyConvolutionFilter1D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glCopyConvolutionFilter1D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glCopyConvolutionFilter1D</refname>
17 <refpurpose>copy pixels into a one-dimensional convolution filter</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glCopyConvolutionFilter1D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
25 <paramdef>GLint <parameter>x</parameter></paramdef>
26 <paramdef>GLint <parameter>y</parameter></paramdef>
27 <paramdef>GLsizei <parameter>width</parameter></paramdef>
28 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31 <refsect1 id="parameters"><title>Parameters</title>
32 <variablelist>
33 <varlistentry>
34 <term><parameter>target</parameter></term>
35 <listitem>
36 <para>
37 Must be <constant>GL_CONVOLUTION_1D</constant>.
38 </para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>internalformat</parameter></term>
43 <listitem>
44 <para>
45 The internal format of the convolution filter kernel.
46 The allowable values are
47 <constant>GL_ALPHA</constant>,
48 <constant>GL_ALPHA4</constant>,
49 <constant>GL_ALPHA8</constant>,
50 <constant>GL_ALPHA12</constant>,
51 <constant>GL_ALPHA16</constant>,
52 <constant>GL_LUMINANCE</constant>,
53 <constant>GL_LUMINANCE4</constant>,
54 <constant>GL_LUMINANCE8</constant>,
55 <constant>GL_LUMINANCE12</constant>,
56 <constant>GL_LUMINANCE16</constant>,
57 <constant>GL_LUMINANCE_ALPHA</constant>,
58 <constant>GL_LUMINANCE4_ALPHA4</constant>,
59 <constant>GL_LUMINANCE6_ALPHA2</constant>,
60 <constant>GL_LUMINANCE8_ALPHA8</constant>,
61 <constant>GL_LUMINANCE12_ALPHA4</constant>,
62 <constant>GL_LUMINANCE12_ALPHA12</constant>,
63 <constant>GL_LUMINANCE16_ALPHA16</constant>,
64 <constant>GL_INTENSITY</constant>,
65 <constant>GL_INTENSITY4</constant>,
66 <constant>GL_INTENSITY8</constant>,
67 <constant>GL_INTENSITY12</constant>,
68 <constant>GL_INTENSITY16</constant>,
69 <constant>GL_R3_G3_B2</constant>,
70 <constant>GL_RGB</constant>,
71 <constant>GL_RGB4</constant>,
72 <constant>GL_RGB5</constant>,
73 <constant>GL_RGB8</constant>,
74 <constant>GL_RGB10</constant>,
75 <constant>GL_RGB12</constant>,
76 <constant>GL_RGB16</constant>,
77 <constant>GL_RGBA</constant>,
78 <constant>GL_RGBA2</constant>,
79 <constant>GL_RGBA4</constant>,
80 <constant>GL_RGB5_A1</constant>,
81 <constant>GL_RGBA8</constant>,
82 <constant>GL_RGB10_A2</constant>,
83 <constant>GL_RGBA12</constant>, or
84 <constant>GL_RGBA16</constant>.
85 </para>
86 </listitem>
87 </varlistentry>
88 <varlistentry>
89 <term><parameter>x</parameter></term>
90 <term><parameter>y</parameter></term>
91 <listitem>
92 <para>
93 The window space coordinates of the lower-left coordinate of the
94 pixel array to copy.
95 </para>
96 </listitem>
97 </varlistentry>
98 <varlistentry>
99 <term><parameter>width</parameter></term>
100 <listitem>
101 <para>
102 The width of the pixel array to copy.
103 </para>
104 </listitem>
105 </varlistentry>
106 </variablelist>
107 </refsect1>
108 <refsect1 id="description"><title>Description</title>
109 <para>
110 <function>glCopyConvolutionFilter1D</function> defines a one-dimensional convolution filter kernel with pixels
111 from the current <constant>GL_READ_BUFFER</constant> (rather than from main memory,
112 as is the case for <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>).
113 </para>
114 <para>
115 The screen-aligned pixel rectangle with lower-left corner at (<parameter>x</parameter>,\ <parameter>y</parameter>),
116 width <parameter>width</parameter> and height 1 is used to define
117 the convolution filter. If any pixels within this region are
118 outside the window that is associated with the GL context, the
119 values obtained for those pixels are undefined.
120 </para>
121 <para>
122 The pixels in the rectangle are processed exactly as if <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>
123 had been called with <emphasis>format</emphasis>
124 set to RGBA, but the process stops just before final conversion.
125 The R, G, B, and A components of each pixel are next scaled by the four
126 1D <constant>GL_CONVOLUTION_FILTER_SCALE</constant> parameters and biased by the
127 four 1D <constant>GL_CONVOLUTION_FILTER_BIAS</constant> parameters.
128 (The scale and bias parameters are set by <citerefentry><refentrytitle>glConvolutionParameter</refentrytitle></citerefentry>
129 using the <constant>GL_CONVOLUTION_1D</constant> target and the names
130 <constant>GL_CONVOLUTION_FILTER_SCALE</constant> and <constant>GL_CONVOLUTION_FILTER_BIAS</constant>.
131 The parameters themselves are vectors of four values that are applied to red,
132 green, blue, and alpha, in that order.)
133 The R, G, B, and A values are not clamped to [0,1] at any time during this
134 process.
135 </para>
136 <para>
137 Each pixel is then converted to the internal format specified by
138 <parameter>internalformat</parameter>.
139 This conversion simply maps the component values of the pixel (R, G, B,
140 and A) to the values included in the internal format (red, green, blue,
141 alpha, luminance, and intensity). The mapping is as follows:
142 </para>
143 <para>
144 </para>
145 <informaltable frame="topbot">
146 <tgroup cols="7" align="left">
147 <colspec colwidth="3*" />
148 <colspec colwidth="1*" align="center"/>
149 <colspec colwidth="1*" align="center"/>
150 <colspec colwidth="1*" align="center"/>
151 <colspec colwidth="1*" align="center"/>
152 <colspec colwidth="1.7*" align="center"/>
153 <colspec colwidth="1.7*" align="center"/>
154 <thead>
155 <row>
156 <entry rowsep="1" align="left"><emphasis role="bold">
157 Internal Format
158 </emphasis></entry>
159 <entry rowsep="1" align="center"><emphasis role="bold">
160 Red
161 </emphasis></entry>
162 <entry rowsep="1" align="center"><emphasis role="bold">
163 Green
164 </emphasis></entry>
165 <entry rowsep="1" align="center"><emphasis role="bold">
166 Blue
167 </emphasis></entry>
168 <entry rowsep="1" align="center"><emphasis role="bold">
169 Alpha
170 </emphasis></entry>
171 <entry rowsep="1" align="center"><emphasis role="bold">
172 Luminance
173 </emphasis></entry>
174 <entry rowsep="1" align="center"><emphasis role="bold">
175 Intensity
176 </emphasis></entry>
177 </row>
178 </thead>
179 <tbody>
180 <row>
181 <entry align="left">
182 <constant>GL_ALPHA</constant>
183 </entry>
184 <entry align="center">
185 </entry>
186 <entry align="center">
187 </entry>
188 <entry align="center">
189 </entry>
190 <entry align="center">
191 A
192 </entry>
193 <entry align="center">
194 </entry>
195 <entry align="center">
196
197 </entry>
198 </row>
199 <row>
200 <entry align="left">
201 <constant>GL_LUMINANCE</constant>
202 </entry>
203 <entry align="center">
204 </entry>
205 <entry align="center">
206 </entry>
207 <entry align="center">
208 </entry>
209 <entry align="center">
210 </entry>
211 <entry align="center">
212 R
213 </entry>
214 <entry align="center">
215
216 </entry>
217 </row>
218 <row>
219 <entry align="left">
220 <constant>GL_LUMINANCE_ALPHA</constant>
221 </entry>
222 <entry align="center">
223 </entry>
224 <entry align="center">
225 </entry>
226 <entry align="center">
227 </entry>
228 <entry align="center">
229 A
230 </entry>
231 <entry align="center">
232 R
233 </entry>
234 <entry align="center">
235
236 </entry>
237 </row>
238 <row>
239 <entry align="left">
240 <constant>GL_INTENSITY</constant>
241 </entry>
242 <entry align="center">
243 </entry>
244 <entry align="center">
245 </entry>
246 <entry align="center">
247 </entry>
248 <entry align="center">
249 </entry>
250 <entry align="center">
251 </entry>
252 <entry align="center">
253 R
254 </entry>
255 </row>
256 <row>
257 <entry align="left">
258 <constant>GL_RGB</constant>
259 </entry>
260 <entry align="center">
261 R
262 </entry>
263 <entry align="center">
264 G
265 </entry>
266 <entry align="center">
267 B
268 </entry>
269 <entry align="center">
270 </entry>
271 <entry align="center">
272 </entry>
273 <entry align="center">
274
275 </entry>
276 </row>
277 <row>
278 <entry align="left">
279 <constant>GL_RGBA</constant>
280 </entry>
281 <entry align="center">
282 R
283 </entry>
284 <entry align="center">
285 G
286 </entry>
287 <entry align="center">
288 B
289 </entry>
290 <entry align="center">
291 A
292 </entry>
293 <entry align="center">
294 </entry>
295 <entry align="center">
296
297 </entry>
298 </row>
299 </tbody>
300 </tgroup>
301 </informaltable>
302 <para>
303 The red, green, blue, alpha, luminance, and/or intensity components of
304 the resulting pixels are stored in floating-point rather than integer
305 format.
306 </para>
307 <para>
308 Pixel ordering is such that lower x screen coordinates correspond to
309 lower <emphasis>i</emphasis> filter image coordinates.
310 </para>
311 <para>
312 Note that after a convolution is performed, the resulting color
313 components are also scaled by their corresponding
314 <constant>GL_POST_CONVOLUTION_c_SCALE</constant> parameters and biased by their
315 corresponding <constant>GL_POST_CONVOLUTION_c_BIAS</constant> parameters (where
316 <emphasis>c</emphasis> takes on the values <emphasis role="bold">RED</emphasis>, <emphasis role="bold">GREEN</emphasis>, <emphasis role="bold">BLUE</emphasis>, and
317 <emphasis role="bold">ALPHA</emphasis>).
318 These parameters are set by <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
319 </para>
320 </refsect1>
321 <refsect1 id="notes"><title>Notes</title>
322 <para>
323 <function>glCopyConvolutionFilter1D</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>
324 is called with an argument of <constant>GL_EXTENSIONS</constant>.
325 </para>
326 </refsect1>
327 <refsect1 id="errors"><title>Errors</title>
328 <para>
329 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
330 <constant>GL_CONVOLUTION_1D</constant>.
331 </para>
332 <para>
333 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not one of the
334 allowable values.
335 </para>
336 <para>
337 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than zero or greater
338 than the maximum supported value.
339 This value may be queried with <citerefentry><refentrytitle>glGetConvolutionParameter</refentrytitle></citerefentry>
340 using target <constant>GL_CONVOLUTION_1D</constant> and name
341 <constant>GL_MAX_CONVOLUTION_WIDTH</constant>.
342 </para>
343 <para>
344 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyConvolutionFilter1D</function> is executed
345 between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
346 execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
347 </para>
348 </refsect1>
349 <refsect1 id="associatedgets"><title>Associated Gets</title>
350 <para>
351 <citerefentry><refentrytitle>glGetConvolutionParameter</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>
352 </para>
353 </refsect1>
354 <refsect1 id="seealso"><title>See Also</title>
355 <para>
356 <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
357 <citerefentry><refentrytitle>glConvolutionParameter</refentrytitle></citerefentry>,
358 <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>
359 </para>
360 </refsect1>
361 <refsect1 id="Copyright"><title>Copyright</title>
362 <para>
363 Copyright <trademark class="copyright"></trademark> 1991-2006
364 Silicon Graphics, Inc. This document is licensed under the SGI
365 Free Software B License. For details, see
366 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
367 </para>
368 </refsect1>
369</refentry>