DepthFunction.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*global define*/
  2. define([
  3. '../Core/freezeObject'
  4. ], function(
  5. freezeObject) {
  6. "use strict";
  7. /**
  8. * Determines the function used to compare two depths for the depth test.
  9. *
  10. * @namespace
  11. * @alias DepthFunction
  12. */
  13. var DepthFunction = {
  14. /**
  15. * 0x200. The depth test never passes.
  16. *
  17. * @type {Number}
  18. * @constant
  19. */
  20. NEVER : 0x0200,
  21. /**
  22. * 0x201. The depth test passes if the incoming depth is less than the stored depth.
  23. *
  24. * @type {Number}
  25. * @constant
  26. */
  27. LESS : 0x201,
  28. /**
  29. * 0x202. The depth test passes if the incoming depth is equal to the stored depth.
  30. *
  31. * @type {Number}
  32. * @constant
  33. */
  34. EQUAL : 0x0202,
  35. /**
  36. * 0x203. The depth test passes if the incoming depth is less than or equal to the stored depth.
  37. *
  38. * @type {Number}
  39. * @constant
  40. */
  41. LESS_OR_EQUAL : 0x203, // LEQUAL
  42. /**
  43. * 0x204. The depth test passes if the incoming depth is greater than the stored depth.
  44. *
  45. * @type {Number}
  46. * @constant
  47. */
  48. GREATER : 0x0204,
  49. /**
  50. * 0x0205. The depth test passes if the incoming depth is not equal to the stored depth.
  51. *
  52. * @type {Number}
  53. * @constant
  54. */
  55. NOT_EQUAL : 0x0205, // NOTEQUAL
  56. /**
  57. * 0x206. The depth test passes if the incoming depth is greater than or equal to the stored depth.
  58. *
  59. * @type {Number}
  60. * @constant
  61. */
  62. GREATER_OR_EQUAL : 0x0206, // GEQUAL
  63. /**
  64. * 0x207. The depth test always passes.
  65. *
  66. * @type {Number}
  67. * @constant
  68. */
  69. ALWAYS : 0x0207
  70. };
  71. return freezeObject(DepthFunction);
  72. });