include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glGetSeparableFilter.xml
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="glGetSeparableFilter">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetSeparableFilter</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetSeparableFilter</refname>
17 <refpurpose>get separable convolution filter kernel images</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetSeparableFilter</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLenum <parameter>format</parameter></paramdef>
25 <paramdef>GLenum <parameter>type</parameter></paramdef>
26 <paramdef>GLvoid * <parameter>row</parameter></paramdef>
27 <paramdef>GLvoid * <parameter>column</parameter></paramdef>
28 <paramdef>GLvoid * <parameter>span</parameter></paramdef>
29 </funcprototype>
30 </funcsynopsis>
31 </refsynopsisdiv>
32 <refsect1 id="parameters"><title>Parameters</title>
33 <variablelist>
34 <varlistentry>
35 <term><parameter>target</parameter></term>
36 <listitem>
37 <para>
38 The separable filter to be retrieved.
39 Must be
40 <constant>GL_SEPARABLE_2D</constant>.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term><parameter>format</parameter></term>
46 <listitem>
47 <para>
48 Format of the output images.
49 Must be one of
50 <constant>GL_RED</constant>,
51 <constant>GL_GREEN</constant>,
52 <constant>GL_BLUE</constant>,
53 <constant>GL_ALPHA</constant>,
54 <constant>GL_RGB</constant>,
55 <constant>GL_BGR</constant>
56 <constant>GL_RGBA</constant>,
57 <constant>GL_BGRA</constant>,
58 <constant>GL_LUMINANCE</constant>, or
59 <constant>GL_LUMINANCE_ALPHA</constant>.
60 </para>
61 </listitem>
62 </varlistentry>
63 <varlistentry>
64 <term><parameter>type</parameter></term>
65 <listitem>
66 <para>
67 Data type of components in the output images.
68 Symbolic constants
69 <constant>GL_UNSIGNED_BYTE</constant>,
70 <constant>GL_BYTE</constant>,
71 <constant>GL_BITMAP</constant>,
72 <constant>GL_UNSIGNED_SHORT</constant>,
73 <constant>GL_SHORT</constant>,
74 <constant>GL_UNSIGNED_INT</constant>,
75 <constant>GL_INT</constant>,
76 <constant>GL_FLOAT</constant>,
77 <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
78 <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
79 <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
80 <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
81 <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
82 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
83 <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
84 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
85 <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
86 <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
87 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
88 <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
89 are accepted.
90 </para>
91 </listitem>
92 </varlistentry>
93 <varlistentry>
94 <term><parameter>row</parameter></term>
95 <listitem>
96 <para>
97 Pointer to storage for the row filter image.
98 </para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term><parameter>column</parameter></term>
103 <listitem>
104 <para>
105 Pointer to storage for the column filter image.
106 </para>
107 </listitem>
108 </varlistentry>
109 <varlistentry>
110 <term><parameter>span</parameter></term>
111 <listitem>
112 <para>
113 Pointer to storage for the span filter image (currently unused).
114 </para>
115 </listitem>
116 </varlistentry>
117 </variablelist>
118 </refsect1>
119 <refsect1 id="description"><title>Description</title>
120 <para>
121 <function>glGetSeparableFilter</function> returns the two one-dimensional filter kernel images for the
122 current separable 2D convolution filter.
123 The row image is placed in <parameter>row</parameter> and the column image is placed in
124 <parameter>column</parameter> according to the specifications in <parameter>format</parameter> and <parameter>type</parameter>.
125 (In the current implementation, <parameter>span</parameter> is not affected in any way.)
126 No pixel transfer operations are performed on the images, but the relevant
127 pixel storage modes are applied.
128 </para>
129 <para>
130 If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
131 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a separable convolution filter is
132 requested, <parameter>row</parameter>, <parameter>column</parameter>, and <parameter>span</parameter> are treated as a byte offset into the buffer object's data store.
133 </para>
134 <para>
135 Color components that are present in <parameter>format</parameter> but not included in the
136 internal format of the filters are returned as zero.
137 The assignments of internal color components to the components of <parameter>format</parameter>
138 are as follows:
139 </para>
140 <para>
141 </para>
142 <informaltable frame="topbot">
143 <tgroup cols="2" align="left">
144 <colspec align="center"/>
145 <colspec align="center"/>
146 <thead>
147 <row>
148 <entry rowsep="1" align="center"><emphasis role="bold">
149 Internal Component
150 </emphasis></entry>
151 <entry rowsep="1" align="center"><emphasis role="bold">
152 Resulting Component
153 </emphasis></entry>
154 </row>
155 </thead>
156 <tbody>
157 <row>
158 <entry align="left">
159 Red
160 </entry>
161 <entry align="left">
162 Red
163 </entry>
164 </row>
165 <row>
166 <entry align="left">
167 Green
168 </entry>
169 <entry align="left">
170 Green
171 </entry>
172 </row>
173 <row>
174 <entry align="left">
175 Blue
176 </entry>
177 <entry align="left">
178 Blue
179 </entry>
180 </row>
181 <row>
182 <entry align="left">
183 Alpha
184 </entry>
185 <entry align="left">
186 Alpha
187 </entry>
188 </row>
189 <row>
190 <entry align="left">
191 Luminance
192 </entry>
193 <entry align="left">
194 Red
195 </entry>
196 </row>
197 <row>
198 <entry align="left">
199 Intensity
200 </entry>
201 <entry align="left">
202 Red
203 </entry>
204 </row>
205 </tbody>
206 </tgroup>
207 </informaltable>
208 <para>
209 </para>
210 </refsect1>
211 <refsect1 id="notes"><title>Notes</title>
212 <para>
213 <function>glGetSeparableFilter</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>
214 is called with an argument of <constant>GL_EXTENSIONS</constant>.
215 </para>
216 <para>
217 Non-separable 2D filters must be retrieved with <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>.
218 </para>
219 </refsect1>
220 <refsect1 id="errors"><title>Errors</title>
221 <para>
222 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_SEPARABLE_2D</constant>.
223 </para>
224 <para>
225 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not one of the allowable
226 values.
227 </para>
228 <para>
229 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not one of the allowable
230 values.
231 </para>
232 <para>
233 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
234 <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
235 <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
236 <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
237 <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
238 and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
239 </para>
240 <para>
241 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
242 <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
243 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
244 <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
245 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
246 <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
247 <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
248 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
249 <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
250 and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
251 </para>
252 <para>
253 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
254 <constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
255 </para>
256 <para>
257 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
258 <constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
259 object such that the memory writes required would exceed the data store size.
260 </para>
261 <para>
262 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
263 <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>row</parameter> or <parameter>column</parameter> is not evenly divisible
264 into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
265 </para>
266 <para>
267 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetSeparableFilter</function> is executed
268 between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
269 execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
270 </para>
271 </refsect1>
272 <refsect1 id="associatedgets"><title>Associated Gets</title>
273 <para>
274 <citerefentry><refentrytitle>glGetConvolutionParameter</refentrytitle></citerefentry>
275 </para>
276 <para>
277 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
278 </para>
279 </refsect1>
280 <refsect1 id="seealso"><title>See Also</title>
281 <para>
282 <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>,
283 <citerefentry><refentrytitle>glConvolutionParameter</refentrytitle></citerefentry>,
284 <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>
285 </para>
286 </refsect1>
287 <refsect1 id="Copyright"><title>Copyright</title>
288 <para>
289 Copyright <trademark class="copyright"></trademark> 1991-2006
290 Silicon Graphics, Inc. This document is licensed under the SGI
291 Free Software B License. For details, see
292 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
293 </para>
294 </refsect1>
295 </refentry>