通过反走样消除锯齿

时间:2021-03-27 17:37:45

procedureopenGLdraw;
begin

glEnable(GL_LINE_SMOOTH);                           //设置反走样
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);              //设置反走样


‍ glColor4f(1.0,1.0,0.0,1.0);                    // 设置黄色,透明度为100%
glLineWidth(10);                              // 设置线的宽度
glBegin(GL_LINE_STRIP);                       // 画线
    glvertex3f(-3,0.5,0);
    glVertex3f(0,0.8,0);
    glVertex3f(3,-0.5,0);
glEnd();                                                                  //            
end;

通过反走样消除锯齿