EvilGenius
05-04-2001, 07:37 PM
Peace folks
I tried to draw a simple polygon using these coordinates:
glBegin(GL_POLYGON);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0f, -2.0f, 0.0f);
glVertex3f(0.5f, -1.2f, 0.0f);
glVertex3f(1.0f, -2.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.5f, -0.1f, 0.0f);
glEnd();
It is supposed to look like a X where the sides are flat. However, the code draws the top also flat. It connects the two upper vertices directly although it is not supposed to do that. What am I doing wrong and how do I fix it?
I tried to draw a simple polygon using these coordinates:
glBegin(GL_POLYGON);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0f, -2.0f, 0.0f);
glVertex3f(0.5f, -1.2f, 0.0f);
glVertex3f(1.0f, -2.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.5f, -0.1f, 0.0f);
glEnd();
It is supposed to look like a X where the sides are flat. However, the code draws the top also flat. It connects the two upper vertices directly although it is not supposed to do that. What am I doing wrong and how do I fix it?