现在我创建了一个多边形,然后我做同样的事情,但用line_loop绘制轮廓。我现在的问题是,如果我将线条粗细设置为高,线条没有连接。他们的结局需要(线宽)更长......有没有办法解决这个问题?
由于
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho (0, 600, 600, 0, 0, 1);
glMatrixMode (GL_MODELVIEW);
......
glLineWidth(5.0);
glTranslatef(250,250,0);
glRotated(x,0,0,50.0);
glBegin(GL_POLYGON); //Begin quadrilateral coordinates
//Trapezoid
glColor3f(255,0,0);
glVertex2f(0,0);
glVertex2f(100,0);
glVertex2f(100,100);
glVertex2f(50,50);
glVertex2f(0,100);
glEnd(); //End quadrilateral coordinates
glBegin(GL_LINE_LOOP); //Begin quadrilateral coordinates
//Trapezoid
glColor3f(0,255,0);
glVertex2f(0,0);
glVertex2f(100,0);
glVertex2f(100,100);
glVertex2f(50,50);
glVertex2f(0,100);
glEnd(); //End quadrilateral coordinates