
<refentry id="glGetColorTableParameter">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>glGetColorTableParameter</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glGetColorTableParameter</refname>
        <refpurpose>get color lookup table parameters</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glGetColorTableParameterfv</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLenum <parameter>pname</parameter></paramdef>
                <paramdef>GLfloat * <parameter>params</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glGetColorTableParameteriv</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLenum <parameter>pname</parameter></paramdef>
                <paramdef>GLint * <parameter>params</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <!-- eqn: ignoring delim $$ -->
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>target</parameter></term>
            <listitem>
                <para>
                    The target color table.
                    Must be
                    <constant>GL_COLOR_TABLE</constant>,
                    <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>,
                    <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>,
                    <constant>GL_PROXY_COLOR_TABLE</constant>,
                    <constant>GL_PROXY_POST_CONVOLUTION_COLOR_TABLE</constant>, or
                    <constant>GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE</constant>.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>pname</parameter></term>
            <listitem>
                <para>
                    The symbolic name of a color lookup table parameter.
                    Must be one of
                    <constant>GL_COLOR_TABLE_BIAS</constant>,
                    <constant>GL_COLOR_TABLE_SCALE</constant>,
                    <constant>GL_COLOR_TABLE_FORMAT</constant>,
                    <constant>GL_COLOR_TABLE_WIDTH</constant>,
                    <constant>GL_COLOR_TABLE_RED_SIZE</constant>,
                    <constant>GL_COLOR_TABLE_GREEN_SIZE</constant>,
                    <constant>GL_COLOR_TABLE_BLUE_SIZE</constant>,
                    <constant>GL_COLOR_TABLE_ALPHA_SIZE</constant>,
                    <constant>GL_COLOR_TABLE_LUMINANCE_SIZE</constant>, or
                    <constant>GL_COLOR_TABLE_INTENSITY_SIZE</constant>.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>params</parameter></term>
            <listitem>
                <para>
                    A pointer to an array where the values of the parameter will be stored.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            Returns parameters specific to color table <parameter>target</parameter>.
        </para>
        <para>
            When <parameter>pname</parameter> is set to <constant>GL_COLOR_TABLE_SCALE</constant> or
            <constant>GL_COLOR_TABLE_BIAS</constant>, <function>glGetColorTableParameter</function> returns the color
            table scale or bias parameters for the table specified by <parameter>target</parameter>.
            For these queries, <parameter>target</parameter> must be set to
            <constant>GL_COLOR_TABLE</constant>,
            <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>,
            or <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant> and
            <parameter>params</parameter> points to an array of four elements, which receive
            the scale or bias factors for red, green, blue, and alpha, in that order.
        </para>
        <para>
            <function>glGetColorTableParameter</function> can also be used to retrieve the format and size parameters
            for a color table. For these queries, set <parameter>target</parameter> to either the
            color table target or the proxy color table target.
            The format and size parameters are set by <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
        </para>
        <para>
            The following table lists the format and size parameters that may
            be queried.
            For each symbolic constant listed below for <parameter>pname</parameter>,
            <parameter>params</parameter> must point to an array of the
            given length and receive the values indicated.
        </para>
        <para>
        </para>
        <informaltable frame="topbot">
            <tgroup cols="3" align="left">
                <colspec colwidth="4*" />
                <colspec colwidth="1*" align="center"/>
                <colspec colwidth="3*" />
                <thead>
                    <row>
                        <entry rowsep="1" align="left"><emphasis role="bold">
                        Parameter
                        </emphasis></entry>
                        <entry rowsep="1" align="center"><emphasis role="bold">
                        N
                        </emphasis></entry>
                        <entry rowsep="1" align="left"><emphasis role="bold">
                        Meaning
                        </emphasis></entry>
                    </row>
                </thead>
                <tbody>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_FORMAT</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Internal format (e.g., <constant>GL_RGBA</constant>)
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_WIDTH</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Number of elements in table
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_RED_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of red component, in bits
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_GREEN_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of green component
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_BLUE_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of blue component
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_ALPHA_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of alpha component
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_LUMINANCE_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of luminance component
                        </entry>
                    </row>
                    <row>
                        <entry align="left">
                        <constant>GL_COLOR_TABLE_INTENSITY_SIZE</constant>
                        </entry>
                        <entry align="center">
                        1
                        </entry>
                        <entry align="left">
                        Size of intensity component
                        </entry>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
        <para>
        </para>
    </refsect1>
    <refsect1 id="notes"><title>Notes</title>
        <para>
            <function>glGetColorTableParameter</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>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not
            an acceptable value.
        </para>
        <para>
            <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetColorTableParameter</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="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glColorTableParameter</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>
