OpenGL之抗锯齿|OpenGL之抗锯齿 以及 线宽的设置

抗锯齿
1.线的抗锯齿
glEnable(GL_LINE_SMOOTH); //启用
glHint(GL_LINE_SMOOTH,GL_NICEST);


//绘制


glDisable(GL_LINE_SMOOTH); //关闭



2.点的抗锯齿
【OpenGL之抗锯齿|OpenGL之抗锯齿 以及 线宽的设置】glEnable(GL_POINT_SMOOTH); //启用
glHint(GL_POINT_SMOOTH,GL_NICEST);


//绘制


glDisable(GL_POINT_SMOOTH); //关闭


3.多边形的抗锯齿
glEnable(GL_POLYGON_SMOOTH); //启用
glHint(GL_POLYGON_SMOOTH,GL_NICEST);


//绘制


glDisable(GL_POLYGON_SMOOTH); //关闭


线宽的设置

glLineWidth(线宽);
glPointSize(点的直径);


    推荐阅读