depthfunc.3gl 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. '\" te
  2. '\"! tbl|eqn | mmdoc
  3. '\"macro stdmacro
  4. .ds Vn Version 1.2
  5. .ds Dt 24 September 1999
  6. .ds Re Release 1.2.1
  7. .ds Dp Jan 14 18:30
  8. .ds Dm 01 depthfunc
  9. .ds Xs 34310 5 depthfunc.gl
  10. .TH GLDEPTHFUNC 3G
  11. .SH NAME
  12. .B "glDepthFunc
  13. \- specify the value used for depth buffer comparisons
  14. .SH C SPECIFICATION
  15. void \f3glDepthFunc\fP(
  16. GLenum \fIfunc\fP )
  17. .nf
  18. .fi
  19. .SH PARAMETERS
  20. .TP \w'\f2func\fP\ \ 'u
  21. \f2func\fP
  22. Specifies the depth comparison function.
  23. Symbolic constants
  24. \%\f3GL_NEVER\fP,
  25. \%\f3GL_LESS\fP,
  26. \%\f3GL_EQUAL\fP,
  27. \%\f3GL_LEQUAL\fP,
  28. \%\f3GL_GREATER\fP,
  29. \%\f3GL_NOTEQUAL\fP,
  30. \%\f3GL_GEQUAL\fP, and
  31. \%\f3GL_ALWAYS\fP are accepted.
  32. The initial value is \%\f3GL_LESS\fP.
  33. .SH DESCRIPTION
  34. \%\f3glDepthFunc\fP specifies the function used to compare each incoming pixel depth value
  35. with the depth value present in the depth buffer.
  36. The comparison is performed only if depth testing is enabled.
  37. (See \%\f3glEnable\fP and \%\f3glDisable\fP of \%\f3GL_DEPTH_TEST\fP.)
  38. .P
  39. \f2func\fP specifies the conditions under which the pixel will be drawn.
  40. The comparison functions are as follows:
  41. .TP 16
  42. \%\f3GL_NEVER\fP
  43. Never passes.
  44. .TP
  45. \%\f3GL_LESS\fP
  46. Passes if the incoming depth value is less than the stored depth value.
  47. .TP
  48. \%\f3GL_EQUAL\fP
  49. Passes if the incoming depth value is equal to the stored depth value.
  50. .TP
  51. \%\f3GL_LEQUAL\fP
  52. Passes if the incoming depth value is less than or equal to
  53. the stored depth value.
  54. .TP
  55. \%\f3GL_GREATER\fP
  56. Passes if the incoming depth value is greater than the stored depth value.
  57. .TP
  58. \%\f3GL_NOTEQUAL\fP
  59. Passes if the incoming depth value is not equal to the stored depth value.
  60. .TP
  61. \%\f3GL_GEQUAL\fP
  62. Passes if the incoming depth value is greater than or equal to
  63. the stored depth value.
  64. .TP
  65. \%\f3GL_ALWAYS\fP
  66. Always passes.
  67. .P
  68. The initial value of \f2func\fP is \%\f3GL_LESS\fP.
  69. Initially, depth testing is disabled.
  70. .NOTES
  71. Even if the depth buffer exists and the depth mask is non-zero, the
  72. depth buffer is not updated if the depth test is disabled.
  73. .SH ERRORS
  74. \%\f3GL_INVALID_ENUM\fP is generated if \f2func\fP is not an accepted value.
  75. .P
  76. \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glDepthFunc\fP
  77. is executed between the execution of \%\f3glBegin\fP
  78. and the corresponding execution of \%\f3glEnd\fP.
  79. .SH ASSOCIATED GETS
  80. \%\f3glGet\fP with argument \%\f3GL_DEPTH_FUNC\fP
  81. .br
  82. \%\f3glIsEnabled\fP with argument \%\f3GL_DEPTH_TEST\fP
  83. .SH SEE ALSO
  84. \%\f3glDepthRange(3G)\fP,
  85. \%\f3glEnable(3G)\fP,
  86. \%\f3glPolygonOffset(3G)\fP