title: Draw coloured dot using WebGL
body: <p>Somehow, I can't seem to be able to find an answer to such a simple question - draw a songle dot using webGL.</p>
  
  <p>Specifically, I'm using folowing function to draw 3D graph (however, the Z axis is represented by a color):</p>
  
  <p><img src="https://i.stack.imgur.com/hP729.png" alt="Sample of the grapg"></p>
  
  <p>Do not get confused by the word "3D" - I want no real 3D, I just want to produce image above using webGL.</p>
  
  <p>Every pixel row is generated from an array, Y axis represents time.</p>
  
  <p>Here you can see how I populate the data now:</p>
  
  <pre><code>       //Normal canvas rendering
         for(var i=0, l=data.length;i&lt;l;i++) {
              h_ctx.beginPath();
              //The color of the dot
              h_ctx.fillStyle = "hsl("+(120-120*(data[i]/255))+", 100%, 45%)";
              //Create a dot using color above
              h_ctx.rect(i,iteration,1, 1);
              h_ctx.fill();
              h_ctx.closePath();
          }
  </code></pre>
  
  <p>If you want to see it in action, I have created a <a href="http://jsfiddle.net/Darker/Jer8t/" rel="nofollow noreferrer">JSFiddle</a>. It requires support of AudioContext.</p>