getWindowPass.lua 880 B

1234567891011121314151617181920212223242526272829
  1. return {
  2. tag = 'graphics-objects',
  3. summary = 'Get the window pass.',
  4. description = [[
  5. Returns the window pass. This is a builtin render `Pass` object that renders to the desktop
  6. window texture. If the desktop window was not open when the graphics module was initialized,
  7. this function will return `nil`.
  8. ]],
  9. arguments = {},
  10. returns = {
  11. pass = {
  12. type = 'Pass',
  13. description = 'The window pass, or `nil` if there is no window.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'pass' }
  20. }
  21. },
  22. notes = [[
  23. `lovr.conf` may be used to change the settings for the pass: `t.graphics.antialias` enables
  24. antialiasing, and `t.graphics.stencil` enables the stencil buffer.
  25. This pass clears the window texture to the background color, which can be changed using
  26. `lovr.graphics.setBackgroundColor`.
  27. ]]
  28. }