Create a buffer to be used as anything other than an element array buffer.
The rendering context.
Optional
data: number | VertexBuffer | ArrayBufferView<ArrayBufferLike>The initial data contained in this buffer or the size of this buffer's data store in bytes.
Optional
usage: BufferUsageThe intended usage of the buffer.
Optional
offset: numberThe index of the element to start reading the initial data at.
Optional
length: numberThe length of the initial data to read into the buffer.
UnsupportedOperationError if a buffer cannot be created.
The data contained in this buffer.
The data contained in this buffer.
The size of this buffer's data store in bytes.
The type of the data in this buffer.
The intended usage of this buffer.
Set the size of this buffer, clearing its data.
The data to store in this buffer or the size to set this buffer's data store to in bytes.
Optional
usage: BufferUsageThe intended usage of the buffer.
Replace all of or update a subset of the data in this buffer.
The data to store in this buffer or the size to set this buffer's data store to in bytes.
Optional
usage: BufferUsageThe intended usage of the buffer.
Optional
srcOffset: numberThe index of the element to start reading the supplied data at.
Optional
length: numberThe length of the supplied data to read.
Optional
dstOffset: numberThe offset in bytes to start replacing data at. If this value is set, a subset of the data in the buffer is updated rather than replacing all of the data in the buffer and the usage pattern of the buffer is not updated.
An array of binary data to be used as a vertex buffer object. Must contain unsigned integers.
See
WebGLBuffer