GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLDEPTHFUNC

GLDEPTHFUNC

Index
 

NAME

glDepthFunc - specify the value used for depth buffer comparisons

 

C SPECIFICATION

void f3glDepthFuncfP( GLenum fIfuncfP )


 

PARAMETERS

f2funcfP
Specifies the depth comparison function. Symbolic constants %f3GL_NEVERfP, %f3GL_LESSfP, %f3GL_EQUALfP, %f3GL_LEQUALfP, %f3GL_GREATERfP, %f3GL_NOTEQUALfP, %f3GL_GEQUALfP, and %f3GL_ALWAYSfP are accepted. The initial value is %f3GL_LESSfP.
 

DESCRIPTION

%f3glDepthFuncfP 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 %f3glEnablefP and %f3glDisablefP of %f3GL_DEPTH_TESTfP.) f2funcfP specifies the conditions under which the pixel will be drawn. The comparison functions are as follows:
%f3GL_NEVERfP
Never passes.
%f3GL_LESSfP
Passes if the incoming depth value is less than the stored depth value.
%f3GL_EQUALfP
Passes if the incoming depth value is equal to the stored depth value.
%f3GL_LEQUALfP
Passes if the incoming depth value is less than or equal to the stored depth value.
%f3GL_GREATERfP
Passes if the incoming depth value is greater than the stored depth value.
%f3GL_NOTEQUALfP
Passes if the incoming depth value is not equal to the stored depth value.
%f3GL_GEQUALfP
Passes if the incoming depth value is greater than or equal to the stored depth value.
%f3GL_ALWAYSfP
Always passes. The initial value of f2funcfP is %f3GL_LESSfP. 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

%f3GL_INVALID_ENUMfP is generated if f2funcfP is not an accepted value. %f3GL_INVALID_OPERATIONfP is generated if %f3glDepthFuncfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glGetfP with argument %f3GL_DEPTH_FUNCfP
%f3glIsEnabledfP with argument %f3GL_DEPTH_TESTfP  

SEE ALSO

%f3glDepthRange(3G)fP, %f3glEnable(3G)fP, %f3glPolygonOffset(3G)fP


 

Index

NAME
C SPECIFICATION
PARAMETERS
DESCRIPTION
ERRORS
ASSOCIATED GETS
SEE ALSO