title: Drawing an image using WebGL
body: <p>Please could anyone explain how to draw an image on a WebGL canvas? At the moment, on a regular '2d' canvas, I'm using this:</p>
  
  <pre><code>var canvas = document.getElementById("canvas");
  var cxt = canvas.getContext('2d');
  
  img.onload = function() {
      cxt.drawImage(img, 0, 0, canvas.width, canvas.height);
  }
  img.src = "data:image/jpeg;base64," + base64var;
  </code></pre>
  
  <p>With WebGL it seems you have to use textures, etc. Can anyone explain how I would adapt this code for WebGL? Thanks for the help! :)</p>