Creates a Readback object which asynchronously downloads data from a Buffer, Texture, or Tally. The readback can be polled for completion, or, after this transfer pass is submitted, Readback:wait can be used to block until the download is complete. This can only be called on a transfer pass, which can be created with lovr.graphics.getPass.
Arguments
Name
Type
Description
buffer
Buffer
The Buffer to download data from.
index
number
The index of the first item to download.
count
number
The number of items to download.
Returns
Name
Type
Description
readback
Readback
The new readback.
Arguments
Name
Type
Default
Description
texture
Texture
The Texture to download data from.
x
number
0
The x offset of the region to download.
y
number
0
The y offset of the region to download.
layer
number
1
The index of the layer to download.
level
number
1
The index of the mipmap level to download.
width
number
nil
The width of the region to download. If nil, the region will be as wide as possible.
height
number
nil
The height of the region to download. If nil, the region will be as tall as possible.