opengl图形多出一个点
我用opengl画四边形,为什么会多出一个点一样,结果好像有五个点连成图形一样。画这个四边形的代码如下:glTranslatef(0,0,-6.0f);glBegin(G...
我用opengl画四边形,为什么会多出一个点一样,结果好像有五个点连成图形一样。画这个四边形的代码如下:
glTranslatef(0,0,-6.0f);
glBegin(GL_QUADS);
glColor3f(0.5f,0.4f,0.7f);
glVertex3f(0,1.0f,0);
glColor3f(0.7f,0.8f,0.2f);
glVertex3f(0,0,0);
glColor3f(0.6f,0.1f,0.5f);
glVertex3f(1.0f,1.0f,0);
glColor3f(0.9f,0.2f,0.4f);
glVertex3f(1.0f,0,0);
glEnd();
谢谢 展开
glTranslatef(0,0,-6.0f);
glBegin(GL_QUADS);
glColor3f(0.5f,0.4f,0.7f);
glVertex3f(0,1.0f,0);
glColor3f(0.7f,0.8f,0.2f);
glVertex3f(0,0,0);
glColor3f(0.6f,0.1f,0.5f);
glVertex3f(1.0f,1.0f,0);
glColor3f(0.9f,0.2f,0.4f);
glVertex3f(1.0f,0,0);
glEnd();
谢谢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询