Jump to content
  • Advertisement
Sign in to follow this  
Jungle Boy

Stripped Triangle or Not?

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

I saw the fastest rendering method on quake 3 is without triangle strips (correct me if i'm wrong...). It uses glDrawElements() of course, but with GL_TRIANGLE for the type of primitives. Why? Another thing that is boring me is that triangle strip forces you, ideally, to have only one normal and texcoord per point, is it right? Should it be the main reason that quake 3 doesn't uses triangle strip on it's mesh? thx in advance

Share this post


Link to post
Share on other sites
Advertisement
Where did you get that much information about the Quake 3 engine from?
Just curious, since the published game source would be much better with that ;-)

Share this post


Link to post
Share on other sites
on older cards/system, where transfer rate and reducing the amount of vertex data/glVertex calls was important, then triangle strips were the best option when the data would allow for it. Ofcourse, the data wont always allow it (need two texture coords per vertex, or different normals for hard corners, things like that).

These days, indexed triangles in strip order is just as fast and alot damned easier than trying todo pure strips. For example, Doom3 uses index triangles for its render.

Share this post


Link to post
Share on other sites
another question

suppose that i'm using arrays of vertices, normals and textcoordinates and i call glDrawElements() to render my models
glDrawElements() needs an index array to render property and to prevent redundant data

but normally vertices that share same point (vertices that share same polys) doesn't have same textcoordinates... so index array (and glDrawElements()) loses it's goal... or not? o_O

Share this post


Link to post
Share on other sites
'index triangles in strip order' are just what the sentance says they are. You arrange you vertex indices so that while you are sending single triangles down the pipeline you index them like strips, in order to make use of any vertex reuse you can take care of.

If a vertex has to be in the same place, with different properties (such as normal or texture coords) then you have to duplicate it, however in practise this wont be many vertices in most models so the advantage still remains when using indexed arrays (namely the use of the post T&L cache).

Share this post


Link to post
Share on other sites
strips are the fastest method usually reason being less data said, the major problem with strips are u cant strip most mehses (unless u start adding in degenerants) or unless u use multiple strips, both methods are messy. plain tris are simplier, not to mention the fact that polygon throughput is rarely the bottleneck, eg its not in quake3 or doom3

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!