     document.write("Whoops! No useful WEB-GL impl available. Shame on you and your browser vendor.<br>" + e.message);
      return;
   }
   gl.viewport(0, 0, canvas.width, canvas.height);
   gl.clearColor(0, 0, 0, 1);
   gl.clear(gl.COLOR_BUFFER_BIT);
   
   // get the vertex and fragment shader source
   var v = document.getElementById("vertex").firstChild.nodeValue;
   var f = document.getElementById("fragment").firstChild.nodeValue;
   
   // compile and link the shaders
   var vs = gl.creat