function getProgramOptions(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;
	    } else if (opt_attribs && !Array.isArray(opt_attribs)) {
	      // If we have an errorCallback we can just return this object
	      // Otherwise we need to construct one with default errorCallback
	      if (opt_attribs.errorCallback) {
	        return opt_attribs;
	      }
	      var opt = opt_attribs;
	      opt_errorCallback = opt.errorCallback;
	      opt_attribs = opt.attribLocations;
	    }

	    var options = {
	      errorCallback: opt_errorCallback || error
	    };

	    if (opt_attribs) {
	      var attribLocations = {};
	      if (Array.isArray(opt_attribs)) {
	        opt_attribs.forEach(function (attrib, ndx) {
	          attribLocations[attrib] = opt_locations ? opt_locations[ndx] : ndx;
	        });
	      } else {
	        attribLocations = opt_attribs;
	      }
	      options.attribLocations = attribLocations;
	    }

	    return options;
	  }
Gets the program options based on all these optional arguments
@param {module:twgl.ProgramOptions|string[]} [opt_attribs] Options for the program or an array of attribs names. Locations will be assigned by index if not passed in
@param {number[]} [opt_locations] The locations for the. 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.ProgramOptions} an instance of ProgramOptions based on the arguments pased on