Skip to main content
gamedev.net
🔒 Locked

help blx

Started by Noxir 0 replies 700+ views
Original Post
Noxir
Noxir
I'm trying to make a polygon shaped as a diamond. But when I compile it's a triangle. Could anybody tell me what I'm doing wrong?

	glBegin(GL_POLYGON);							
        glVertex3f(-1.0f, 1.0f, 0.0f);
        glVertex3f( 0.0f, 2.0f, 0.0f);
        glVertex3f( 1.0f, 1.0f, 0.0f);
        glVertex3f(-1.0f, 1.0f, 0.0f);
        glVertex3f( 0.0f, 2.0f, 0.0f);
        glVertex3f( 1.0f, 1.0f, 0.0f);
	glEnd();
Here's how I think: http://img414.imageshack.us/img414/7650/namnls9fc.jpg yea i sux at glvertex3f -.-
dcosborn
dcosborn
Change your last three to:
glVertex3f( 1.0f, -1.0f, 0.0f);
glVertex3f( 0.0f, -2.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.