getMirrorTexture.lua 806 B

12345678910111213141516171819202122232425
  1. return {
  2. tag = 'headset',
  3. summary = 'Get the Texture containing a view of what\'s in the headset.',
  4. description = [[
  5. Returns a Texture that contains whatever is currently rendered to the headset.
  6. Sometimes this can be `nil` if the current headset driver doesn't have a mirror texture, which
  7. can happen if the driver renders directly to the display. Currently the `desktop`, `webxr`, and
  8. `vrapi` drivers do not have a mirror texture.
  9. It also isn't guaranteed that the same Texture will be returned by subsequent calls to this
  10. function. Currently, the `oculus` driver exhibits this behavior.
  11. ]],
  12. arguments = {},
  13. returns = {
  14. {
  15. name = 'mirror',
  16. type = 'Texture',
  17. description = 'The mirror texture.'
  18. }
  19. },
  20. related = {
  21. 'lovr.mirror'
  22. }
  23. }