Jump to content
  • Advertisement
Sign in to follow this  
HMPARTICLE

Drawing an A using a single GL_TRIANGLE_STRIP

This topic is 1028 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

The below is what I currently have, and to "bridge the A" i am going to have to add another triangle trip. which will look ugly in wireframe. 

 

Could someone suggest another method?

 

 

 

glBegin(GL_TRIANGLE_STRIP);
   glVertex3f(10,10,0);
   glVertex3f(20,10,0);
 
   glVertex3f(30,80,0);
   glVertex3f(40,70,0);
 
   glVertex3f(50,80,0);
   glVertex3f(60,10,0);
 
   glVertex3f(70,10,0);
   glEnd();
 
   glBegin(GL_TRIANGLE_STRIP);

[\code]

Share this post


Link to post
Share on other sites
Advertisement

Reconsider what you are doing. A single triangle strip mesh can either look like an "A" (as filled triangles) or be nicely minimal and symmetric (as a wireframe), not both.

You can relax the triangle strip requirement, using two triangle strips or (better) index buffers to share vertices and edges freely; you can hack a single triangle strip into a convoluted, asymmetrical shape that renders as the "A" shape you want; or you can draw something topologically simpler, like the current shape of your code example.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!