title: Drawing a circle in android with opengl-es results in a square
body: <p>I am trying to draw a circle in opengl-es using the following code. It creates a number of points around a circle. If I print out the values in the vertex array it can be seen that they form points around a circle.</p>
  
  <pre><code>// Create verticies for a circle
  
  points=40;
  vertices = new float[(points+1)*3];
  
  //CENTER OF CIRCLE
  vertices[0]=0.0f;
  vertices[1]=0.0f;
  vertices[2]=0.0f;
  
  for (int i = 3; i&lt;(points+1)*3; i+=3){
      double rad = deg2rad(i*360/points);
      vertices[i] = (float) (Math.cos(rad));
      vertices[i+1] = (float) (Math.sin(rad));
      vertices[i+2] = 0;
  }
  
  // vertexBuffer is filled with verticies
  </code></pre>
  
  <p>And the calls to opengl in my drawing function:    </p>
  
  <pre><code>// IN MY DRAWING FUNCTION:
  gl.glPushMatrix();
  gl.glTranslatef(x, y, 0);
  gl.glScalef(size, size, 1.0f);
  gl.glColor4f(1.0f,1.0f,1.0f, 1.0f); 
  gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
  gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  gl.glDrawArrays(GL10.GL_TRIANGLE_FAN, 0, points/2);
  gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
  gl.glPopMatrix();
  </code></pre>
  
  <p>However I never get a circle drawn to the screen, only ever a square. I am very confused, any help is appreciated :)</p>