Jump to content
  • Advertisement


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


Newbie: Flipping

This topic is 6513 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
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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!