Original Post
Hi All, I am new to OpenGL and 3D graphics. I am trying to create a circle. I see lots of examples all over the internet for how to do this, but for some mysterious reason it just doesn't work for me. GLint circle_points = 100; glBegin(GL_LINE_LOOP); for (int i = 0; i < circle_points; i++) { float angle = TWO_PI*i/circle_points; glVertex2f(cos(angle), sin(angle)); } glEnd(); This is code I got directly from the OpenGL redbook, but it only draws a straight line on my screen. TWO_PI is defined as 2*M_PI. I just don't get it. I have tried several different algorithms, but I can't get any of them to work. What clues should I look for to solve this problem? many many thanks! Barry
