Buffer:newReadback
EditCreates and returns a new Readback
that will download the data in the Buffer from VRAM. Once the readback is complete, Readback:getData
returns the data as a table, or Readback:getBlob
returns the data as a Blob
.
readback = Buffer:newReadback(offset, extent)
Arguments
Name | Type | Default | Description |
offset | number | 0 | A byte offset to read from. |
extent | number | nil | The number of bytes to read. If nil, reads the rest of the buffer. |
Returns
Name | Type | Description |
readback | Readback | A new Readback object. |
Notes
The offset and extent arguments must be a multiple of the Buffer's stride (unless it was created without a format).