Pass:read

Edit

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

NameTypeDescription
bufferBuffer The Buffer to download data from.
indexnumber The index of the first item to download.
countnumber The number of items to download.

Returns

NameTypeDescription
readbackReadback The new readback.

Arguments

NameTypeDefaultDescription
textureTexture The Texture to download data from.
xnumber0 The x offset of the region to download.
ynumber0 The y offset of the region to download.
layernumber1 The index of the layer to download.
levelnumber1 The index of the mipmap level to download.
widthnumbernil The width of the region to download. If nil, the region will be as wide as possible.
heightnumbernil The height of the region to download. If nil, the region will be as tall as possible.

Returns

NameTypeDescription
readbackReadback The new readback.

Arguments

NameTypeDescription
tallyTally The Tally to download data from.
indexnumber The index of the first item to download.
countnumber The number of items to download.

Returns

NameTypeDescription
readbackReadback The new readback.

See also