setStencilTest.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Set the stencil test.',
  4. description = [[
  5. Sets the stencil test. The stencil test lets you mask out pixels that meet certain criteria,
  6. 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. compareMode = {
  12. type = 'CompareMode',
  13. description = [[
  14. The comparison method used to decide if a pixel should be visible, or nil if the stencil
  15. test is disabled.
  16. ]]
  17. },
  18. compareValue = {
  19. type = 'number',
  20. description = 'The value to compare stencil values to.'
  21. }
  22. },
  23. returns = {},
  24. variants = {
  25. {
  26. arguments = { 'compareMode', 'compareValue' },
  27. returns = {}
  28. },
  29. {
  30. description = 'Disables the stencil test.',
  31. arguments = {},
  32. returns = {}
  33. }
  34. },
  35. notes = [[
  36. Stencil values are between 0 and 255.
  37. By default, the stencil test is disabled.
  38. ]],
  39. related = {
  40. 'lovr.graphics.stencil'
  41. }
  42. }