• Advertisement
Sign in to follow this  

Drawing an A using a single GL_TRIANGLE_STRIP

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