B2G/gecko/browser/devtools/tilt/TiltGL.jsm
/**
   * Links two compiled vertex or fragment shaders together to form a program.
   *
   * @param {Object} aContext
   *                 a WebGL context
   * @param {WebGLShader} aVertShader
   *                      the compiled vertex shader
   * @param {WebGLShader} aFragShader
   *                      the compiled fragment shader
   *
   * @return {WebGLProgram} the newly created and linked shader program
   */
Links two compiled vertex or fragment shaders together to form a program.
@param {Object} aContext
a WebGL context
@param {WebGLShader} aVertShader
the compiled vertex shader
@param {WebGLShader} aFragShader
the compiled fragment shader

@return {WebGLProgram} the newly created and linked shader program
Links two compiled vertex or fragment shaders together to form a program . @param { Object } aContext a WebGL context @param { WebGLShader } aVertShader the compiled vertex shader @param { WebGLShader } aFragShader the compiled fragment shader @return { WebGLProgram } the newly created and linked shader program
function TGLPU_link(aContext, aVertShader, aFragShader)
  {
    let gl = aContext, program, status;
    program = gl.createProgram();
    gl.attachShader(program, aVertShader);
    gl.attachShader(program, aFragShader);
    gl.linkProgram(program);
    if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
      status = gl.getProgramInfoLog(program);
      TiltUtils.Output.error(
        TiltUtils.L10n.format("linkProgram.error", [status]));
      return null;
    }
    program.id = this._count++;
    return program;
  }
function TGLPU_link ( aContext , aVertShader , aFragShader ) { let gl = aContext , program , status ; program = gl . createProgram ( ) ; gl . attachShader ( program , aVertShader ) ; gl . attachShader ( program , aFragShader ) ; gl . linkProgram ( program ) ; if ( ! gl . getProgramParameter ( program , gl . LINK_STATUS ) ) { status = gl . getProgramInfoLog ( program ) ; TiltUtils . Output . error ( TiltUtils . L10n . format ( "linkProgram.error" , [ status ] ) ) ; return null ; } program . id = this . _count ++ ; return program ; }
Links two compiled vertex or fragment shaders together to form a program.
Links two compiled vertex or fragment shaders together to form a program .
// create a program and attach the compiled vertex and fragment shaders // attach the vertex and fragment shaders to the program // verify the link status; if something went wrong, log the error // generate an id for the program