Jump to content
  • Advertisement
Sign in to follow this  
Cone83

Performance question

This topic is 5392 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!)

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!