GLBufferAttribute constructor

GLBufferAttribute(
  1. int buffer,
  2. String type,
  3. int itemSize,
  4. int elementSize,
  5. int count,
)

buffer — Must be a WebGLBuffer.

type — One of WebGL Data Types.

itemSize — The number of values of the array that should be associated with a particular vertex. For instance, if this attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.

elementSize — 1, 2 or 4. The corresponding size (in bytes) for the given "type" param.

Implementation

GLBufferAttribute(
    int buffer, String type, int itemSize, int elementSize, int count)
    : super() {
  this.buffer = buffer;
  this.type = type;
  this.itemSize = itemSize;
  this.elementSize = elementSize;
  this.count = count;

  version = 0;
}