Answer:
function createAndFillBufferObject(gl, data) {
var buffer_id;
// Create a buffer object
buffer_id = gl.createBuffer();
if (!buffer_id) {
out.displayError('Failed to create the buffer object for ' + model_name);
return null;
}
// Make the buffer object the active buffer.
gl.bindBuffer(gl.ARRAY_BUFFER, buffer_id);
// Upload the data for this buffer object to the GPU.
gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
return buffer_id;
}