GL_APICALL void GL_APIENTRY glDepthFunc(
GLenum func
);
| Name | Description | |
|---|---|---|
| in | func | Comparison function |
Specifies the comparison function to use for depth tests.
You can set func to the following values.
| GL_NEVER | The depth test always fails. |
|---|---|
| GL_LESS | Passes when the depth value of the fragment is less than the depth value in the depth buffer. |
| GL_EQUAL | Passes when the depth value of the fragment is equal to the depth value in the depth buffer. |
| GL_LEQUAL | Passes when the depth value of the fragment is less than or equal to the depth value in the depth buffer. |
| GL_GREATER | Passes when the depth value of the fragment is greater than the depth value in the depth buffer. |
| GL_NOTEQUAL | Passes when the depth value of the fragment is not equal to the depth value in the depth buffer. |
| GL_GEQUAL | Passes when the depth value of the fragment is greater than or equal to the depth value in the depth buffer. |
| GL_ALWAYS | The depth test always passes. |
This function generates the following errors.
| GL_INVALID_ENUM | The func argument was set to an invalid value. |
|---|---|
| GL_INVALID_OPERATION | This function was called without any command-list objects bound. |
CONFIDENTIAL