createBufferFromBufferAttribute method
dynamic
createBufferFromBufferAttribute(
- OpenGLContextES gl,
- BufferAttribute bufferAttribute,
- int drawType
The drawType can be:
- ARRAY_BUFFER
- gl.ELEMENT_ARRAY_BUFFER
Implementation
createBufferFromBufferAttribute(OpenGLContextES gl, BufferAttribute bufferAttribute, int drawType) {
var buffer = gl.createBuffer();
gl.bindBuffer(drawType, buffer);
gl.bufferData(drawType, bufferAttribute.array, gl.STATIC_DRAW);
return buffer;
}