   Circle Drawing - Missing something obvious [SOLVED]
  I know I'm missing something obvious here, but I'm comparing two functions that operate almost exactly the same, but one works as expected, and one does nothing as far as I know.The culprit:void drawFilledCircle(float X, float Y, float RADIUS, float R, float G, float B){  glColor3f(R,G,B);  glBegin(GL_POLYGON);    float nx,ny;   for(float i=0;i<=360;i+=10)   {    nx = sin(i*PI/180)*RADIUS;ny = cos(i*PI/180)*RADIUS;    glVertex2f(TransXpt(X+nx), TransYpt(Y+nx));  }    glEnd();  return;}The similar working function:void drawFilledCircle(float X, float Y, float RADIUS, float STARTANGLE, float ENDANGLE, float R, float G, float B){  glColor3f(R,G,B);  glBegin(GL_POLYGON);    float nx, ny;  float stepping = (ENDANGLE-STARTANGLE)/35;    for(float i=STARTANGLE+stepping;i<=ENDANGLE;i+=stepping)  {    nx = sin(i*PI/180)*RADIUS;    ny = cos(i*PI/180)*RADIUS;   glVertex2f(TransXpt(X+nx), TransYpt(Y+ny));  }  glVertex2f(TransXpt(X), TransYpt(Y));  glEnd();  return;}Now other then the special conditions in the for loop, the two functions operate similarly, with the exception of putting a vertex in the center (to create a pie slice).  The functions TransXpt(float) and TransYpt(float) are just to change coordinates from a scale 0 to XRES to -1 to 1, and 0 to YRES to -1 to 1, respectively.  Thanks in advance for any help.edit: grammar.[Edited by - Mawr on January 20, 2005 4:47:06 AM]
  Change line glVertex2f(TransXpt(X+nx), TransYpt(Y+nx));withglVertex2f(TransXpt(X+nx), TransYpt(Y+ny));It should work now.   ;  My guess is the last glVertex2f call that is AFTER the for loop is needed.Didn't try the code though.Plus AP's change of course.   ;  The AP's fix worked. Thanks! I'd rate you up, but I can't rate an Anonymous Poster.   