I have been given the the task of quantifying the frame rate of an app as a function of scene complexity. Something like finding FPS(#triangles in scene).
Objects for this app are specified by vertex data for tri strips. For example to specify a quad, you specify that it has a total 4 unique vertices, then give the vertex data, then you have to specify the indices used… e.g. an input file might look like this
Number of vertices
4
-
-
-
V1
-
-
-1. 1. 0. # V2
- -1. 0. # V3
-1. -1. 0. # V4
Coordinate Indices
2 # 2 Tri-strips
0 1 2 # use vertices 0,1,2
2 1 3 # use vertices 2,1,3
I want to generate input files with varying numbers of tri-strip vertices for a quad to test the FPS vs. tris. But I don’t want to have to manually create each file, so I was curious if there was an alorithm I could use to generate the verts and indices. Maybe something that will let me specify x and y extent and the number of verts horiztonally and vertically, the the output being a list of vertices and a list of index triples.
Maybe someone knows of an example that does this sort of thing?
Thanks,
CB