function clearOnError(gl, error, texture, callback) {
    if (console) {
      console.error(error);
    }
    gl.bindTexture(gl.TEXTURE_2D, texture);
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, new Uint8Array([0, 0, 0]));
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);

    // Notify the user that an error occurred and the texture is ready.
    if (callback) { callback(texture, error, null); }
  }
// and clears out stale data if we're re-using a texture.
and clears out stale data if we're re-using a texture.
and clears out stale data if we ' re re - using a texture .
function clearOnError(gl, error, texture, callback) {
    if (console) {
      console.error(error);
    }
    gl.bindTexture(gl.TEXTURE_2D, texture);
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, new Uint8Array([0, 0, 0]));
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
    if (callback) { callback(texture, error, null); }
  }
function clearOnError ( gl , error , texture , callback ) { if ( console ) { console . error ( error ) ; } gl . bindTexture ( gl . TEXTURE_2D , texture ) ; gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGB , 1 , 1 , 0 , gl . RGB , gl . UNSIGNED_BYTE , new Uint8Array ( [ 0 , 0 , 0 ] ) ) ; gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MAG_FILTER , gl . NEAREST ) ; gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MIN_FILTER , gl . NEAREST ) ; if ( callback ) { callback ( texture , error , null ) ; } }
and clears out stale data if we're re-using a texture.
and clears out stale data if we ' re re - using a texture .
// Notify the user that an error occurred and the texture is ready.