createAttributeBuffer method

Buffer createAttributeBuffer(
  1. OpenGLContextES gl,
  2. BufferAttribute bufferAttribute
)

Creates an attribute buffer.

Implementation

Buffer createAttributeBuffer(OpenGLContextES gl, BufferAttribute bufferAttribute) {
  Buffer buffer = gl.createBuffer();
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
  gl.bufferData(gl.ARRAY_BUFFER, bufferAttribute.array, gl.STATIC_DRAW);
  return buffer;
}