This creates a new GLBufferAttribute object.
Must be a WebGLBuffer. See .buffer
One of WebGL Data Types. See .type
How many values make up each item (vertex). See .itemSize
1
, 2
or 4
. The corresponding size (in bytes) for the given type param. See .elementSize
The expected number of vertices in VBO. See .count
Readonly
isGLBufferRead-only flag to check if a given object is of type GLBufferAttribute.
Optional name for this attribute instance.
The current WebGLBuffer instance.
A WebGL Data Type describing the underlying VBO contents.
GLenum
)Set this property together with .elementSize. The recommended way is using the .setType() method.
How many values make up each item (vertex).
Stores the corresponding size in bytes for the current .type property value.
The corresponding size (in bytes) for the given "type" param.
GLenum
)The expected number of vertices in VBO.
A version number, incremented every time the needsUpdate property is set to true.
Setting this to true increments .version.
Sets the .buffer property.
Sets the both type and elementSize properties.
Sets the itemSize property.
Sets the count property.
This buffer attribute class does not construct a VBO.
Instead, it uses whatever VBO is passed in constructor and can later be altered via the .buffer property.
Remarks
It is required to pass additional params alongside the VBO
Those are: the GL context, the GL data type, the number of components per vertex, the number of bytes per component, and the number of vertices.
See