-
Draw polygon
i used this code to draw rectangle but i dunno how modify it to draw a six vertice polygon. please help ...
glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units
glBegin(GL_POLYGON); // Draw A Quad
glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left
glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glEnd();
-
Re: Draw polygon
Add 2 more glVertex3f calls to your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules