Blame |
Last modification |
View Log
| RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glGetSeparableFilter">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>glGetSeparableFilter</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glGetSeparableFilter</refname>
<refpurpose>get separable convolution filter kernel images</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGetSeparableFilter</function></funcdef>
<paramdef>GLenum <parameter>target</parameter></paramdef>
<paramdef>GLenum <parameter>format</parameter></paramdef>
<paramdef>GLenum <parameter>type</parameter></paramdef>
<paramdef>GLvoid * <parameter>row</parameter></paramdef>
<paramdef>GLvoid * <parameter>column</parameter></paramdef>
<paramdef>GLvoid * <parameter>span</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>target</parameter></term>
<listitem>
<para>
The separable filter to be retrieved.
Must be
<constant>GL_SEPARABLE_2D</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format of the output images.
Must be one of
<constant>GL_RED</constant>,
<constant>GL_GREEN</constant>,
<constant>GL_BLUE</constant>,
<constant>GL_ALPHA</constant>,
<constant>GL_RGB</constant>,
<constant>GL_BGR</constant>
<constant>GL_RGBA</constant>,
<constant>GL_BGRA</constant>,
<constant>GL_LUMINANCE</constant>, or
<constant>GL_LUMINANCE_ALPHA</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type</parameter></term>
<listitem>
<para>
Data type of components in the output images.
Symbolic constants
<constant>GL_UNSIGNED_BYTE</constant>,
<constant>GL_BYTE</constant>,
<constant>GL_BITMAP</constant>,
<constant>GL_UNSIGNED_SHORT</constant>,
<constant>GL_SHORT</constant>,
<constant>GL_UNSIGNED_INT</constant>,
<constant>GL_INT</constant>,
<constant>GL_FLOAT</constant>,
<constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
<constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
<constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
<constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
<constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
are accepted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>row</parameter></term>
<listitem>
<para>
Pointer to storage for the row filter image.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>column</parameter></term>
<listitem>
<para>
Pointer to storage for the column filter image.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>span</parameter></term>
<listitem>
<para>
Pointer to storage for the span filter image (currently unused).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
<function>glGetSeparableFilter</function> returns the two one-dimensional filter kernel images for the
current separable 2D convolution filter.
The row image is placed in <parameter>row</parameter> and the column image is placed in
<parameter>column</parameter> according to the specifications in <parameter>format</parameter> and <parameter>type</parameter>.
(In the current implementation, <parameter>span</parameter> is not affected in any way.)
No pixel transfer operations are performed on the images, but the relevant
pixel storage modes are applied.
</para>
<para>
If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
(see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a separable convolution filter is
requested, <parameter>row</parameter>, <parameter>column</parameter>, and <parameter>span</parameter> are treated as a byte offset into the buffer object's data store.
</para>
<para>
Color components that are present in <parameter>format</parameter> but not included in the
internal format of the filters are returned as zero.
The assignments of internal color components to the components of <parameter>format</parameter>
are as follows:
</para>
<para>
</para>
<informaltable frame="topbot">
<tgroup cols="2" align="left">
<colspec align="center"/>
<colspec align="center"/>
<thead>
<row>
<entry rowsep="1" align="center"><emphasis role="bold">
Internal Component
</emphasis></entry>
<entry rowsep="1" align="center"><emphasis role="bold">
Resulting Component
</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry align="left">
Red
</entry>
<entry align="left">
Red
</entry>
</row>
<row>
<entry align="left">
Green
</entry>
<entry align="left">
Green
</entry>
</row>
<row>
<entry align="left">
Blue
</entry>
<entry align="left">
Blue
</entry>
</row>
<row>
<entry align="left">
Alpha
</entry>
<entry align="left">
Alpha
</entry>
</row>
<row>
<entry align="left">
Luminance
</entry>
<entry align="left">
Red
</entry>
</row>
<row>
<entry align="left">
Intensity
</entry>
<entry align="left">
Red
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
</para>
</refsect1>
<refsect1 id="notes"><title>Notes</title>
<para>
<function>glGetSeparableFilter</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>
is called with an argument of <constant>GL_EXTENSIONS</constant>.
</para>
<para>
Non-separable 2D filters must be retrieved with <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>.
</para>
</refsect1>
<refsect1 id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_SEPARABLE_2D</constant>.
</para>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not one of the allowable
values.
</para>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not one of the allowable
values.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
<constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
<constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
<constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
<constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
<constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
<constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
<constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
object such that the memory writes required would exceed the data store size.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>row</parameter> or <parameter>column</parameter> is not evenly divisible
into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetSeparableFilter</function> is executed
between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
</para>
</refsect1>
<refsect1 id="associatedgets"><title>Associated Gets</title>
<para>
<citerefentry><refentrytitle>glGetConvolutionParameter</refentrytitle></citerefentry>
</para>
<para>
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glConvolutionParameter</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>