Performance question

Started by
5 comments, last by hplus0603 19 years, 6 months ago
hi all I have to render an unusually shaped string and I have 2 options for doing this: Either drawing the whole string with one single triangle stirp or to always summerize 2 triangles to 1 quad and then draw the strip with packages of 1 quad + 1 triangle. I was wondering which would be faster. Does anyone have a suggestion?
Advertisement
AFAIK ... all modern cards convert quads to tris anyway
I once made a test with my Nvidia TNT2 card by drawing a heightmap once with quad strips and once with triangle strips and i remember the quad strips where a bit faster
a TNT2 card is hardly 'modern' it also lacked a HWT&L unit, as such the CPU was doing all the transform work, so the faster rate was probably down to the number of verts it had to process on the CPU.

These days, aside from one off objects (GUIs or particals for example), triangles are the better option.
Everyone always told me triangle stirps were fastest, however quads were the fastest, dont ask me why but they were like an entire 10% faster in a small demo i made..

radeon 9000
it wouldnt surprise me if quads are faster than tris. for stuff that has 4 vertices eg particles, HUD (actually quite a lot of stuff). youre sending 4 indices instead of 6.

FWIW i use quads/quads strips whenever possible (they look better in wireframe as well!)

If you're setting render state (texture, transform, etc), and then drawing 4 vertices, or 6, there's hardly going to be any difference between the two cases -- changing the render state is going to dominate.

If the options are:
1) setting render state, then drawing a large triangle list
2) setting render state, then drawing a large triangle strip with lots of degenerate triangles
3) setting render state, drawing a quad and a triangle, repeat for as long as necessary

then they will perform in the order written (option 1 would be fastest).
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement