Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gldepthfunc(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



glDepthFunc(3G)                OpenGL Reference                glDepthFunc(3G)



NAME
     glDepthFunc - specify the value used for depth buffer comparisons


C SPECIFICATION
     void glDepthFunc( GLenum func )


PARAMETERS
     func  Specifies the depth comparison function.  Symbolic constants
           GLNEVER, GLLESS, GLEQUAL, GLLEQUAL, GLGREATER, GLNOTEQUAL,
           GLGEQUAL, and GLALWAYS are accepted.  The initial value is
           GLLESS.

DESCRIPTION
     glDepthFunc 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 glEnable
     and glDisable of GLDEPTHTEST.)

     func specifies the conditions under which the pixel will be drawn.  The
     comparison functions are as follows:

     GLNEVER        Never passes.

     GLLESS         Passes if the incoming depth value is less than the
                     stored depth value.

     GLEQUAL        Passes if the incoming depth value is equal to the stored
                     depth value.

     GLLEQUAL       Passes if the incoming depth value is less than or equal
                     to the stored depth value.

     GLGREATER      Passes if the incoming depth value is greater than the
                     stored depth value.

     GLNOTEQUAL     Passes if the incoming depth value is not equal to the
                     stored depth value.

     GLGEQUAL       Passes if the incoming depth value is greater than or
                     equal to the stored depth value.

     GLALWAYS       Always passes.

     The initial value of func is GLLESS.  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.







                                                                        Page 1





glDepthFunc(3G)                OpenGL Reference                glDepthFunc(3G)



ERRORS
     GLINVALIDENUM is generated if func is not an accepted value.

     GLINVALIDOPERATION is generated if glDepthFunc is executed between the
     execution of glBegin and the corresponding execution of glEnd.

ASSOCIATED GETS
     glGet with argument GLDEPTHFUNC
     glIsEnabled with argument GLDEPTHTEST


SEE ALSO
     glDepthRange, glEnable, glPolygonOffset










































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026