setColorMask.lua 1.0 KB

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