Generating tri-strip indices

I have been given the task of determining an application’s frame rate as a function of triangles rendered. The specification of the objects is done by tri strips. The object input file has a section which lists vertices, for example a quad:

1.0 1.0 0.0
0.0 1.0 0.0
1.0 0.0 0.0
0.0 0.0 0.0

and a section which lists the tri strip indices:

4 0 1 2 3

Where the first number is the number of indices, followed by the indices.

There are similar sections for surface normals and texture coordinates. This is a custom in-house (i.e. stupid) format.

My plan is to make a single quad, with an increasing number of tri-strips, and determine the frame rate for each quad. The problem is that for any significant number of tri-strips, the creation of this input file becomes extraorinarily tedious.

I am seeking suggestions on

  1. A better way to do this test?


  1. An easier way to generate the input file

Creating the vertices is easy… I can whip out some C code to do that in about 5 minutes. The issue is generating the tri-strips from the vertex data.

Will NvTriStrip or tri-stripper do this for me, without generation a tri-strip of only two triangles?


My suggestion: draw the vertex grid on a sheet of paper, you will soon see how to index them to create tri-strips.

And didn’t you ask that question already?

The other question was specifically concerning auto generation of indices, whereas I tried to generalize a bit more by asking for possible suggestions on a better way to test the fps vs. tris of an app.

BTW, I have tried to draw the quad out, and specify the verts, etc. but a pattern just isn’t becoming apparent to me. Maybe I have looked at the problem too long and can’t see the forrest for the trees…

I think this shoudl do the trick (triangle winding not preserved, but I think it would be possible by playing with degenerate triangles, just don’t want to think any longer)

0 2 4 6 8

1/18 3/16 5/14 7/12 9/10

19 17 15 13 11