1GLDEPTHFUNC(3G)                 [FIXME: manual]                GLDEPTHFUNC(3G)
2
3
4

NAME

6       glDepthFunc - specify the value used for depth buffer comparisons
7

C SPECIFICATION

9       void glDepthFunc(GLenum func);
10

PARAMETERS

12       func
13           Specifies the depth comparison function. Symbolic constants
14           GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL,
15           GL_GEQUAL, and GL_ALWAYS are accepted. The initial value is
16           GL_LESS.
17

DESCRIPTION

19       glDepthFunc specifies the function used to compare each incoming pixel
20       depth value with the depth value present in the depth buffer. The
21       comparison is performed only if depth testing is enabled. (See
22       glEnable() and
23
24       glDisable of GL_DEPTH_TEST.)
25
26       func specifies the conditions under which the pixel will be drawn. The
27       comparison functions are as follows:
28
29       GL_NEVER
30           Never passes.
31
32       GL_LESS
33           Passes if the incoming depth value is less than the stored depth
34           value.
35
36       GL_EQUAL
37           Passes if the incoming depth value is equal to the stored depth
38           value.
39
40       GL_LEQUAL
41           Passes if the incoming depth value is less than or equal to the
42           stored depth value.
43
44       GL_GREATER
45           Passes if the incoming depth value is greater than the stored depth
46           value.
47
48       GL_NOTEQUAL
49           Passes if the incoming depth value is not equal to the stored depth
50           value.
51
52       GL_GEQUAL
53           Passes if the incoming depth value is greater than or equal to the
54           stored depth value.
55
56       GL_ALWAYS
57           Always passes.
58
59       The initial value of func is GL_LESS. Initially, depth testing is
60       disabled. If depth testing is disabled or if no depth buffer exists, it
61       is as if the depth test always passes.
62

NOTES

64       Even if the depth buffer exists and the depth mask is non-zero, the
65       depth buffer is not updated if the depth test is disabled. In order to
66       unconditionally write to the depth buffer, the depth test should be
67       enabled and set to GL_ALWAYS.
68

ERRORS

70       GL_INVALID_ENUM is generated if func is not an accepted value.
71

ASSOCIATED GETS

73       glGet() with argument GL_DEPTH_FUNC
74
75       glIsEnabled() with argument GL_DEPTH_TEST
76

VERSION SUPPORT

78       ┌────────────┬───────────────────────────────────────────────────────────────────────┐
79       │            │                OpenGL Version                                         
80       ├────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
81Function    2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
82/           │     │     │     │     │     │     │     │     │     │     │     │     │
83Feature     │     │     │     │     │     │     │     │     │     │     │     │     │
84Name        │     │     │     │     │     │     │     │     │     │     │     │     │
85       ├────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
86glDepthFunc │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
87       └────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
88

SEE ALSO

90       glDepthRange(), glEnable(), glPolygonOffset()
91
93       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
94       Khronos Group. This document is licensed under the SGI Free Software B
95       License. For details, see http://oss.sgi.com/projects/FreeB/.
96
98       Copyright © 1991-2006 Silicon Graphics, Inc.
99       Copyright © 2010-2014 Khronos Group
100
101
102
103[FIXME: source]                   03/06/2019                   GLDEPTHFUNC(3G)
Impressum