function createProgram(gl, fragmentSource, vertexSource) {
  const program = gl.createProgram();

  const vertexShader = createShader(gl, gl.VERTEX_SHADER, vertexSource);
  const fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, fragmentSource);
  if (program === null) {
    throw new Error('Program creation failed');
  }

  gl.attachShader(program, vertexShader);
  gl.attachShader(program, fragmentShader);

  gl.linkProgram(program);
  if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
    const log = gl.getProgramInfoLog(program);
    if (log === null) {
      throw new Error('Program info log creation failed');
    }
    throw new Error();
  }
  return program;
}
@param {WebGLRenderingContext} gl Rendering Context.
@param {string} fragmentSource Fragment shader source.
@param {string} vertexSource Vertex shader source.
@return {WebGLProgram} [progam] The program.