getColorMask.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Get whether each color channel is enabled.',
  4. description = [[
  5. Returns a boolean for each color channel (red, green, blue, alpha) indicating whether it is
  6. enabled. When a color channel is enabled, it will be affected by drawing commands and clear
  7. commands.
  8. ]],
  9. arguments = {},
  10. returns = {
  11. {
  12. name = 'r',
  13. type = 'boolean',
  14. description = 'Whether the red color channel is enabled.'
  15. },
  16. {
  17. name = 'g',
  18. type = 'boolean',
  19. description = 'Whether the green color channel is enabled.'
  20. },
  21. {
  22. name = 'b',
  23. type = 'boolean',
  24. description = 'Whether the blue color channel is enabled.'
  25. },
  26. {
  27. name = 'a',
  28. type = 'boolean',
  29. description = 'Whether the alpha color channel is enabled.'
  30. }
  31. },
  32. returns = {},
  33. notes = [[
  34. By default, all color channels are enabled.
  35. Disabling all of the color channels can be useful if you only want to write to the depth
  36. buffer or the stencil buffer.
  37. ]],
  38. related = {
  39. 'lovr.graphics.stencil'
  40. }
  41. }