getPass.lua 887 B

123456789101112131415161718192021222324252627282930
  1. return {
  2. summary = 'Get the render pass for the layer.',
  3. description = 'Returns the render pass for the layer. This can be used to render to the layer.',
  4. arguments = {},
  5. returns = {
  6. pass = {
  7. type = 'Pass',
  8. description = 'The layer\'s render pass.'
  9. }
  10. },
  11. variants = {
  12. {
  13. arguments = {},
  14. returns = { 'pass' }
  15. }
  16. },
  17. notes = [[
  18. This function will reset the Layer's render pass when it is called.
  19. The Pass will have its background color cleared to the background color, set using
  20. `lovr.graphics.setBackgroundColor`.
  21. The Pass will have its view matrix set to the identity matrix, and its projection will be set to
  22. an orthographic matrix where the top left of the texture is at the origin and the bottom right
  23. of the texture will be at `(width, height)` in pixels.
  24. ]],
  25. related = {
  26. 'Layer:getTexture'
  27. }
  28. }