Buffer:getStride

Edit

Returns the distance between each item in the Buffer, in bytes.

stride = Buffer:getStride()

Arguments

None

Returns

NameTypeDescription
stridenumber The stride of the Buffer, in bytes.

Notes

When a Buffer is created, the stride can be set explicitly, otherwise it will be automatically computed based on the fields in the Buffer.

Strides can not be zero, and can not be smaller than the size of a single item. To work around this, bind the Buffer as a storage buffer and fetch data from the buffer manually.

See also