function createVAOAndSetAttributes(gl, setters, attribs, indices) {
  var vao = gl.createVertexArray();
  gl.bindVertexArray(vao);
  programs.setAttributes(setters, attribs);

  if (indices) {
    gl.bindBuffer(ELEMENT_ARRAY_BUFFER, indices);
  } // We unbind this because otherwise any change to ELEMENT_ARRAY_BUFFER
  // like when creating buffers for other stuff will mess up this VAO's binding


  gl.bindVertexArray(null);
  return vao;
}
Creates a vertex array object and then sets the attributes on it

@param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
@param {Object.<string, function>} setters Attribute setters as returned from createAttributeSetters
@param {Object.<string, module:twgl.AttribInfo>} attribs AttribInfos mapped by attribute name.
@param {WebGLBuffer} [indices] an optional ELEMENT_ARRAY_BUFFER of indices

@return {WebGLVertexArrayObject|null} The created WebGLVertexArrayObject

@memberOf module:twgl/vertexArrays