getStencilTest.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Get the current stencil test.',
  4. description = [[
  5. Returns the current stencil test. The stencil test lets you mask out pixels that meet certain
  6. criteria, based on the contents of the stencil buffer. The stencil buffer can be modified using
  7. `lovr.graphics.stencil`. After rendering to the stencil buffer, the stencil test can be set to
  8. control how subsequent drawing functions are masked by the stencil buffer.
  9. ]],
  10. arguments = {},
  11. returns = {
  12. {
  13. name = 'compareMode',
  14. type = 'CompareMode',
  15. description = [[
  16. The comparison method used to decide if a pixel should be visible, or nil if the stencil
  17. test is disabled.
  18. ]]
  19. },
  20. {
  21. name = 'compareValue',
  22. type = 'number',
  23. description = [[
  24. The value stencil values are compared against, or nil if the stencil test is disabled.
  25. ]]
  26. }
  27. },
  28. notes = [[
  29. Stencil values are between 0 and 255.
  30. By default, the stencil test is disabled.
  31. ]],
  32. related = {
  33. 'lovr.graphics.stencil'
  34. }
  35. }