Perfomance question

I have a database that has tri-strips, triangles, quads, and polys. For each texture, I first draw all the triangles associated with the texture, then all the tri-strips associated with the texture, etc. Then, I go on to the next texture. Should my performance increase if I break up all the polys, quads, and tri-strips into triangles and only draw triangles. I would think this would be faster because I don’t have to change states from tri-strips to quads to polys to triangles for every
texture, but I’m not seeing any improvement gains. Should I be seeing any performance improvement? What type of performance gain/loss should I see? Has anyone tried
this before?

From what I understand this will speed you up dramatically. However, you will speed up even more if you were able to make them almost all strips and render that way.


I suspect that sending one poly (say 4 verts) is quicker than 2 tris (6 verts). You would need to send them as tri strips. This is more obvious when you consider the example of two polys (8 verts) vs tri strips (6 verts). This obviously assumes 4 sided polys.

When the question is “which is faster” then the answer is always “measure it”.

Specifically, most hardware only deals with triangles (and possibly quads). If you’re specifying polygons, then the driver will have to tesselate the polygons to triangles in software before sending them to the hardware – clearly doing this once in your program and always drawing as triangles will measure as being faster.

Now, the next question is how you measure properly :slight_smile: (glFinish() helps here)

If you switch textures around on single objects, you might want to try to merge textures. Eg if you have some biped model and use different textures for arms, legs, torso, head, put them all together in a single larger texture map. This will reduce texture switching overhead. The gains that can be had with this diminish with very complex geometry (ie when each arm is made up of 5000 faces, gains are minimal).

This may be purely academical, but it may work better drawing the fast geometry first, and then the individual triangles. Chances are that the strips and fans already occlude some of your tris and that these can be discarded faster on hardware with advanced depth culling.