function drawBufferInfo(gl, bufferInfo, primitiveType, count, offset) {
      const indices = bufferInfo.indices;
      primitiveType = primitiveType === undefined ? gl.TRIANGLES : primitiveType;
      const numElements = count === undefined ? bufferInfo.numElements : count;
      offset = offset === undefined ? 0 : offset;
      if (indices) {
        gl.drawElements(primitiveType, numElements, gl.UNSIGNED_SHORT, offset);
      } else {
        gl.drawArrays(primitiveType, offset, numElements);
      }
    }
Draws a list of objects
@param {WebGLRenderingContext} gl A WebGLRenderingContext
@param {DrawObject[]} objectsToDraw an array of objects to draw.
@memberOf module:webgl-utils