title: OpenGL ES 2.0 with iPhone: GL_POINT_SMOOTH draws squares with ES 2.0 but works in ES 1.0
body: <p>I'm trying to draw circles by using a Vertex Buffer Object to draw points with GL_POINT_SMOOTH enabled in OpenGL ES 2.0 on iPhone.</p>
  
  <p>I've used the following ES 1.0 rendering code to draw circles successfully on iPhone 4:</p>
  
  <pre><code>glVertexPointer(2, GL_FLOAT, 0, circleVertices);
  glEnableClientState(GL_VERTEX_ARRAY);
  glEnable(GL_POINT_SMOOTH);
  glPointSize(radius*2);
  glDrawArrays(GL_POINTS, 0, 1);
  </code></pre>
  
  <p>I'm now trying to achieve the same effect using a set-up VBO followed by this ES 2.0 rendering code:</p>
  
  <pre><code>glEnable(GL_BLEND); 
  glEnable(GL_POINT_SPRITE_OES);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glEnable(GL_POINT_SMOOTH);
  glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
  glDrawElements(GL_POINTS, numPoints, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
  </code></pre>
  
  <p>However the output vertices are very clearly square, not circular.</p>
  
  <p>I've tried reducing the 'glEnable' and related calls in the above to emulate the first, working version but no visible change in output occurs; the shapes are still square. I've also tried replacing the 'glDrawElements' call with:</p>
  
  <pre><code>    glDrawArrays(GL_POINTS,0,numPoints);
  </code></pre>
  
  <p>..but again there's no change.</p>
  
  <p>The point size is set in the <strong>vertex shader</strong>, and the shader is successfully compiled and run:</p>
  
  <pre><code>uniform mediump mat4 projMx;
  
  attribute vec2 a_position;      
  attribute vec4 a_color;     
  attribute float a_radius;       
  varying vec4 v_color;
  void main()
  {
      vec4 position = vec4(a_position.x,a_position.y,1.0,1.0);
      gl_Position = projMx * position;
      gl_PointSize = a_radius*2.0;
      v_color = a_color;
  }
  </code></pre>
  
  <p>Does anyone know why circles aren't drawn with the glDrawElements VBO version?</p>