sample/js/transient.js
function getShader(gl, source, isVertex) {
  var shader = gl.createShader(isVertex ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);
  gl.shaderSource(shader, source);
  gl.compileShader(shader);

  // See if it compiled successfully

  if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
    alert("An error occurred compiling the shaders: " + gl.getShaderInfoLog(shader));
    return null;
  }

  return shader;
}
function getShader(gl, source, isVertex) {
  var shader = gl.createShader(isVertex ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);
  gl.shaderSource(shader, source);
  gl.compileShader(shader);

  // See if it compiled successfully

  if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
    alert("An error occurred compiling the shaders: " + gl.getShaderInfoLog(shader));
    return null;
  }

  return shader;
}
function getShader ( gl , source , isVertex ) { var shader = gl . createShader ( isVertex ? gl . VERTEX_SHADER : gl . FRAGMENT_SHADER ) ; gl . shaderSource ( shader , source ) ; gl . compileShader ( shader ) ; // See if it compiled successfully if ( ! gl . getShaderParameter ( shader , gl . COMPILE_STATUS ) ) { alert ( "An error occurred compiling the shaders: " + gl . getShaderInfoLog ( shader ) ) ; return null ; } return shader ; }
getShader  Loads a shader program
getShader Loads a shader program