NAME
glDepthFunc
- specify the value used for depth buffer comparisons
C SPECIFICATION
void ggllDDeepptthhFFuunncc(
GLenum _f_u_n_c )
PARAMETERS
-
_f_u_n_c
-
Specifies the depth comparison function.
Symbolic constants
GGLL__NNEEVVEERR,
GGLL__LLEESSSS,
GGLL__EEQQUUAALL,
GGLL__LLEEQQUUAALL,
GGLL__GGRREEAATTEERR,
GGLL__NNOOTTEEQQUUAALL,
GGLL__GGEEQQUUAALL, and
GGLL__AALLWWAAYYSS are accepted.
The initial value is GGLL__LLEESSSS.
DESCRIPTION
ggllDDeepptthhFFuunncc 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 ggllEEnnaabbllee and ggllDDiissaabbllee of GGLL__DDEEPPTTHH__TTEESSTT.)
_f_u_n_c specifies the conditions under which the pixel will be drawn.
The comparison functions are as follows:
-
GGLL__NNEEVVEERR
-
Never passes.
-
GGLL__LLEESSSS
-
Passes if the incoming depth value is less than the stored depth value.
-
GGLL__EEQQUUAALL
-
Passes if the incoming depth value is equal to the stored depth value.
-
GGLL__LLEEQQUUAALL
-
Passes if the incoming depth value is less than or equal to
the stored depth value.
-
GGLL__GGRREEAATTEERR
-
Passes if the incoming depth value is greater than the stored depth value.
-
GGLL__NNOOTTEEQQUUAALL
-
Passes if the incoming depth value is not equal to the stored depth value.
-
GGLL__GGEEQQUUAALL
-
Passes if the incoming depth value is greater than or equal to
the stored depth value.
-
GGLL__AALLWWAAYYSS
-
Always passes.
The initial value of _f_u_n_c is GGLL__LLEESSSS.
Initially, depth testing is disabled.
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.
ERRORS
GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _f_u_n_c is not an accepted value.
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllDDeepptthhFFuunncc
is executed between the execution of ggllBBeeggiinn
and the corresponding execution of ggllEEnndd.
ASSOCIATED GETS
ggllGGeett with argument GGLL__DDEEPPTTHH__FFUUNNCC
ggllIIssEEnnaabblleedd with argument GGLL__DDEEPPTTHH__TTEESSTT
SEE ALSO
ggllDDeepptthhRRaannggee((33GG)),
ggllEEnnaabbllee((33GG)),
ggllPPoollyyggoonnOOffffsseett((33GG))