19,468
社区成员
发帖
与我相关
我的任务
分享
glEnable (GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
const int n = 10;
const GLfloat R = 0.5f;
const GLfloat Pi = 3.1415926536f;
int i;
glBegin(GL_LINE_LOOP);
for(i=0; i<n; ++i)
glVertex2f(R + R*cos(2*Pi/n*i), R + R*sin(2*Pi/n*i));
glEnd();
glFlush();