PDA

View Full Version : circle in open GL



tali
11-12-2004, 02:47 AM
hi, is there any command to draw a circle?

Hylke Donker
11-12-2004, 10:11 AM
opengl doesn't have such function, but you can write your own, by drawing a dot on every degree.

Aeluned
11-12-2004, 11:43 AM
actually you can draw a circle using gluDisk. the circle will have to be filled however.

zukko
11-14-2004, 12:02 PM
you can try this


glBegin(GL_LINE_STRIP);
for(i=0;i<360;i++)
{
x=sin(i);
y=cos(i);
glVertex2f(x,y);
}
glEnd();