<?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="glEnable">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>glEnable</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glEnable</refname>
        <refpurpose>enable or disable server-side GL capabilities</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glEnable</function></funcdef>
                <paramdef>GLenum <parameter>cap</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>cap</parameter></term>
            <listitem>
                <para>
                    Specifies a symbolic constant indicating a GL capability.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glDisable</function></funcdef>
                <paramdef>GLenum <parameter>cap</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 id="parameters2"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>cap</parameter></term>
            <listitem>
                <para>
                    Specifies a symbolic constant indicating a GL capability.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            <function>glEnable</function> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> enable and disable various capabilities.
            Use <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> to determine the current setting
            of any capability. The initial value for each capability with the
            exception of <constant>GL_DITHER</constant> is <constant>GL_FALSE</constant>. The initial value for
            <constant>GL_DITHER</constant> is <constant>GL_TRUE</constant>.
        </para>
        <para>
            Both <function>glEnable</function> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> take a single argument, <parameter>cap</parameter>,
            which can assume one of the following values:
        </para>
        <variablelist>
            <varlistentry>
                <term><constant>GL_BLEND</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        blend the computed fragment color values with the values in the color
                        buffers. See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_CULL_FACE</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        cull polygons based on their winding in window coordinates.
                        See <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_DEPTH_TEST</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        do depth comparisons and update the depth buffer. Note that even if
                        the depth buffer exists and the depth mask is non-zero, the
                        depth buffer is not updated if the depth test is disabled. See
                        <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry> and
                        <citerefentry><refentrytitle>glDepthRangef</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_DITHER</constant>	</term>
                <listitem>
                    <para>
                        If enabled,
                        dither color components or indices before they are written to the
                        color buffer.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_POLYGON_OFFSET_FILL</constant></term>
                <listitem>
                    <para>
                        If enabled, an offset is added to depth values of a polygon's
                        fragments produced by rasterization.
                        See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        compute a temporary coverage value where each bit is determined by the
                        alpha value at the corresponding sample location.  The temporary coverage
                        value is then ANDed with the fragment coverage value.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_SAMPLE_COVERAGE</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        the fragment's coverage is ANDed with the temporary coverage value.  If
                        <constant>GL_SAMPLE_COVERAGE_INVERT</constant> is set to <constant>GL_TRUE</constant>, invert the coverage
                        value.
                        See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_SCISSOR_TEST</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        discard fragments that are outside the scissor rectangle.
                        See <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_STENCIL_TEST</constant></term>
                <listitem>
                    <para>
                        If enabled,
                        do stencil testing and update the stencil buffer.
                        See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>cap</parameter> is not one of the values
            listed previously.
        </para>
    </refsect1>
    <refsect1 id="associatedgets"><title>Associated Gets</title>
        <para>
            <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>
        </para>
        <para>
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glDepthRangef</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage2D</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>
