<function>glDepthFunc</function> specifies the function used to compare each incoming pixel depth value
with the depth value present in the depth buffer.
The comparison is performed only if depth testing is enabled.
(See <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> of <constant>GL_DEPTH_TEST</constant>.)
</para>
<para>
<parameter>func</parameter> specifies the conditions under which the pixel will be drawn.
The comparison functions are as follows:
</para>
<variablelist>
<varlistentry>
<term><constant>GL_NEVER</constant></term>
<listitem>
<para>
Never passes.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_LESS</constant></term>
<listitem>
<para>
Passes if the incoming depth value is less than the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_EQUAL</constant></term>
<listitem>
<para>
Passes if the incoming depth value is equal to the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_LEQUAL</constant></term>
<listitem>
<para>
Passes if the incoming depth value is less than or equal to
the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_GREATER</constant></term>
<listitem>
<para>
Passes if the incoming depth value is greater than the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_NOTEQUAL</constant></term>
<listitem>
<para>
Passes if the incoming depth value is not equal to the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_GEQUAL</constant></term>
<listitem>
<para>
Passes if the incoming depth value is greater than or equal to
the stored depth value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_ALWAYS</constant></term>
<listitem>
<para>
Always passes.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The initial value of <parameter>func</parameter> is <constant>GL_LESS</constant>.
Initially, depth testing is disabled. If depth testing is disabled or if no
depth buffer exists, it is as if the depth test always passes.
</para>
</refsect1>
<refsect1id="notes"><title>Notes</title>
<para>
Even if the depth buffer exists and the depth mask is non-zero, the