Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

plastickid

Newbie: Flipping

This topic is 6340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone tell me how I can flip a triangle completly because I want to make a diamond and I can''t seem to do it..I want the opposite of this: //2d triangle glLoadIdentity(); glTranslatef(-2.5f,4.0f,-15.0f); glRotatef(rtri2,0.0f,1.0f,0.0f); glBegin(GL_TRIANGLES); glVertex3f(0.0f, 1.0f, 0.0f); glVertex3f(-1.0f,-1.0f, 0.0f); glVertex3f(1.0f,-1.0f, 0.0f); glEnd(); rtri2+=1; This is a regular triangle like this:/\ i want one of this \/ the other way thanks a million.. plastickid Too lazy to think!

Share this post


Link to post
Share on other sites
Advertisement
It''s easy. You only need to change the sign of the Y values of the glVertex commands like this:

glVertex3f( 0.0f,-1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f( 1.0f, 1.0f, 0.0f);

Hope that helps. (Hmm, pretty cliche, eh? )

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!