Buffer:clear
EditClears some or all of the data in the temporary Buffer to zero. Permanent Buffers can be cleared in a transfer pass using Pass:clear
.
Buffer:clear(index, count)
Arguments
Name | Type | Default | Description |
index | number | 1 | The index of the first item to clear. |
count | number | nil |
The number of items to clear. If nil , clears to the end of the Buffer.
|
Returns
Nothing
Notes
Clearing a permanent buffer requires the byte offset and byte count of the cleared range to be a multiple of 4. This will usually be true for most data types.