wait.lua 604 B

12345678910111213141516171819202122
  1. return {
  2. summary = 'Wait for the Readback to finish.',
  3. description = 'Blocks the CPU until the Readback is finished on the GPU.',
  4. arguments = {},
  5. returns = {
  6. waited = {
  7. type = 'boolean',
  8. description = 'Whether the CPU had to be blocked for waiting.'
  9. }
  10. },
  11. variants = {
  12. {
  13. arguments = {},
  14. returns = { 'waited' }
  15. }
  16. },
  17. notes = [[
  18. If `lovr.graphics.submit` or `lovr.graphics.wait` has not been called since the readback was
  19. created, the readback has not been submitted yet, so no wait will occur and this function will
  20. return `false`.
  21. ]]
  22. }