1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- '\" te
- '\"! tbl|eqn | mmdoc
- '\"macro stdmacro
- .ds Vn Version 1.2
- .ds Dt 24 September 1999
- .ds Re Release 1.2.1
- .ds Dp Jan 14 18:30
- .ds Dm 01 depthfunc
- .ds Xs 34310 5 depthfunc.gl
- .TH GLDEPTHFUNC 3G
- .SH NAME
- .B "glDepthFunc
- \- specify the value used for depth buffer comparisons
- .SH C SPECIFICATION
- void \f3glDepthFunc\fP(
- GLenum \fIfunc\fP )
- .nf
- .fi
- .SH PARAMETERS
- .TP \w'\f2func\fP\ \ 'u
- \f2func\fP
- Specifies the depth comparison function.
- Symbolic constants
- \%\f3GL_NEVER\fP,
- \%\f3GL_LESS\fP,
- \%\f3GL_EQUAL\fP,
- \%\f3GL_LEQUAL\fP,
- \%\f3GL_GREATER\fP,
- \%\f3GL_NOTEQUAL\fP,
- \%\f3GL_GEQUAL\fP, and
- \%\f3GL_ALWAYS\fP are accepted.
- The initial value is \%\f3GL_LESS\fP.
- .SH DESCRIPTION
- \%\f3glDepthFunc\fP 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 \%\f3glEnable\fP and \%\f3glDisable\fP of \%\f3GL_DEPTH_TEST\fP.)
- .P
- \f2func\fP specifies the conditions under which the pixel will be drawn.
- The comparison functions are as follows:
- .TP 16
- \%\f3GL_NEVER\fP
- Never passes.
- .TP
- \%\f3GL_LESS\fP
- Passes if the incoming depth value is less than the stored depth value.
- .TP
- \%\f3GL_EQUAL\fP
- Passes if the incoming depth value is equal to the stored depth value.
- .TP
- \%\f3GL_LEQUAL\fP
- Passes if the incoming depth value is less than or equal to
- the stored depth value.
- .TP
- \%\f3GL_GREATER\fP
- Passes if the incoming depth value is greater than the stored depth value.
- .TP
- \%\f3GL_NOTEQUAL\fP
- Passes if the incoming depth value is not equal to the stored depth value.
- .TP
- \%\f3GL_GEQUAL\fP
- Passes if the incoming depth value is greater than or equal to
- the stored depth value.
- .TP
- \%\f3GL_ALWAYS\fP
- Always passes.
- .P
- The initial value of \f2func\fP is \%\f3GL_LESS\fP.
- Initially, depth testing is disabled.
- .NOTES
- 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.
- .SH ERRORS
- \%\f3GL_INVALID_ENUM\fP is generated if \f2func\fP is not an accepted value.
- .P
- \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glDepthFunc\fP
- is executed between the execution of \%\f3glBegin\fP
- and the corresponding execution of \%\f3glEnd\fP.
- .SH ASSOCIATED GETS
- \%\f3glGet\fP with argument \%\f3GL_DEPTH_FUNC\fP
- .br
- \%\f3glIsEnabled\fP with argument \%\f3GL_DEPTH_TEST\fP
- .SH SEE ALSO
- \%\f3glDepthRange(3G)\fP,
- \%\f3glEnable(3G)\fP,
- \%\f3glPolygonOffset(3G)\fP
|