Buffer:clear

Clears 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

NameTypeDefaultDescription
indexnumber1 The index of the first item to clear.
countnumbernil 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.

See also