Home / comp / gb.opengl / gl / depthfunc 
Gl.DepthFunc (gb.opengl)
Syntax
STATIC SUB DepthFunc ( Function AS Integer )

Specify the value used for depth buffer comparisons

Parameters

Description

  Gl.DepthFunc specifies the function used to compare each incoming pixel z value with the z value present in the depth buffer. The comparison is performed only if depth testing is enabled. (See Gl.Enable and Gl.Disable of Gl.GL_DEPTH_TEST).

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

The default value of Function is Gl.GL_LESS. Initially, depth testing is disabled.

Errors

Gl.GL_INVALID_ENUM is generated if Function is not an accepted value.
Gl.GL_INVALID_OPERATION is generated if Gl.DepthFunc is called between a call to Gl.Begin and the corresponding call to Gl.End.

Associated Gets

Gl.GetDepthFunc
Gl.IsEnabled with argument Gl.GL_DEPTH_TEST

See also

Gl.DepthRange, Gl.Enable