StencilFunction.js 2.1 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 stencil values for the stencil test.
  9. *
  10. * @namespace
  11. * @alias StencilFunction
  12. */
  13. var StencilFunction = {
  14. /**
  15. * 0x0200. The stencil test never passes.
  16. *
  17. * @type {Number}
  18. * @constant
  19. */
  20. NEVER : 0x0200,
  21. /**
  22. * 0x0201. The stencil test passes when the masked reference value is less than the masked stencil value.
  23. *
  24. * @type {Number}
  25. * @constant
  26. */
  27. LESS : 0x0201,
  28. /**
  29. * 0x0202. The stencil test passes when the masked reference value is equal to the masked stencil value.
  30. *
  31. * @type {Number}
  32. * @constant
  33. */
  34. EQUAL : 0x0202,
  35. /**
  36. * 0x0203. The stencil test passes when the masked reference value is less than or equal to the masked stencil value.
  37. *
  38. * @type {Number}
  39. * @constant
  40. */
  41. LESS_OR_EQUAL : 0x0203, // WebGL: LEQUAL
  42. /**
  43. * 0x0204. The stencil test passes when the masked reference value is greater than the masked stencil value.
  44. *
  45. * @type {Number}
  46. * @constant
  47. */
  48. GREATER : 0x0204,
  49. /**
  50. * 0x0205. The stencil test passes when the masked reference value is not equal to the masked stencil value.
  51. *
  52. * @type {Number}
  53. * @constant
  54. */
  55. NOT_EQUAL : 0x0205, // WebGL: NOTEQUAL
  56. /**
  57. * 0x0206. The stencil test passes when the masked reference value is greater than or equal to the masked stencil value.
  58. *
  59. * @type {Number}
  60. * @constant
  61. */
  62. GREATER_OR_EQUAL : 0x0206, // WebGL: GEQUAL
  63. /**
  64. * 0x0207. The stencil test always passes.
  65. *
  66. * @type {Number}
  67. * @constant
  68. */
  69. ALWAYS : 0x0207
  70. };
  71. return freezeObject(StencilFunction);
  72. });