function createProgramInfo(
      gl, shaderSources, opt_attribs, opt_locations, opt_errorCallback) {
    if (typeof opt_locations === 'function') {
      opt_errorCallback = opt_locations;
      opt_locations = undefined;
    }
    if (typeof opt_attribs === 'function') {
      opt_errorCallback = opt_attribs;
      opt_attribs = undefined;
    }
    var errFn = opt_errorCallback || error;
    var good = true;
    shaderSources = shaderSources.map(function(source) {
      // Lets assume if there is no \n it's an id
      if (source.indexOf("\n") < 0) {
        var script = document.getElementById(source);
        if (!script) {
          errFn("no element with id: " + source);
          good = false;
        } else {
          source = script.text;
        }
      }
      return source;
    });
    if (!good) {
      return null;
    }
    var program = createProgramFromSources(gl, shaderSources, opt_attribs, opt_locations, opt_errorCallback);
    if (!program) {
      return null;
    }
    return createProgramInfoFromProgram(gl, program);
  }
Creates a ProgramInfo from 2 sources.

A ProgramInfo contains

    programInfo = {
       program: WebGLProgram,
       uniformSetters: object of setters as returned from createUniformSetters,
       attribSetters: object of setters as returned from createAttribSetters,
    }

NOTE: There are 3 signatures for this function

    twgl.createProgramInfo(gl, [vs, fs], opt_errFunc);
    twgl.createProgramInfo(gl, [vs, fs], opt_attribs, opt_errFunc);
    twgl.createProgramInfo(gl, [vs, fs], opt_attribs, opt_locations, opt_errFunc);

@param {WebGLRenderingContext} gl The WebGLRenderingContext
       to use.
@param {string[]} shaderSources Array of sources for the
       shaders or ids. The first is assumed to be the vertex shader,
       the second the fragment shader.
@param {string[]} [opt_attribs] An array of attribs names. Locations will be assigned by index if not passed in
@param {number[]} [opt_locations] The locations for the attributes. A parallel array to opt_attribs letting you assign locations.
@param {module:twgl.ErrorCallback} opt_errorCallback callback for errors. By default it just prints an error to the console
       on error. If you want something else pass an callback. It's passed an error message.
@return {module:twgl.ProgramInfo?} The created ProgramInfo or null if it failed to link or compile
@memberOf module:twgl/programs