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


proper rendering of chaotic triangle strips.

Recommended Posts

GekkoCube    116
Bare with me guys, this could be my last question of the year regarding triangle strips! I am now in the process of optimizing my terrain. This includes, changing primitives to strip, not fans, frustrum culling, and tweaking code. I only need help with the first one. Rendering a quadtree with a bunch of triangle fan quads was straight forward and easy. But migrating to triangle strips...I can see some problems up ahead. With different levels of terrain resolution within the quadtree, what is an efficient way to draw all the triangles using triangle strips (with the minimal/optimal number of calls to DrawPrimitive as possible). In other words, I dont want to call DrawPrimitive per quad, or per row. Im thinking about batching up quads of like resolution together. but even this poses a problem as using tri-strips for various triangles that are not adjacent to each other and not of the same size might (and will) cause extra triangles that shouldnt be there. Anybody have the experience and/or knowledge on this, please shed some light on this - thanks!

Share this post

Link to post
Share on other sites
Muhammad Haggag    1358
You can always use degenerate triangles to convert *any* set of triangles to a single strip.

A degenerate triangle is basically a triangle with 2 vertices having the same position.

However, there''s a limit (that''s device specific) to the number of degenerate triangles to add, after which you get worse performance.

There''s an article about degenerate triangles on, and you can get a lot out of nvidia''s and/or ATI''s developer websites if you search for them. And of course, there''s the mighty google.

Muhammad Haggag

Share this post

Link to post
Share on other sites