Archived

This topic is now archived and is closed to further replies.

Xgkkp

Whats the faster way to draw a quad?

Recommended Posts

Xgkkp    122
Whats the faster way to draw a quad? Triangle Strip with four vertices or a triangle Fan with 4?

Share this post


Link to post
Share on other sites
S1CA    1418
For a single quad, both are just as fast as each other in practical terms.

However if you''re planning on drawing lots of quads separately, with each one being drawn with a single render call you have a problem in your design!...

3D hardware likes big batches of data to play with, sending it a quad at a time will cripple it if you''re sending a lot of quads.

If there are multiple quads with the same shader/texture joined together in some way, strips will be the best since you can get multiple quads into a single *indexed* strip.

If there are multiple quads with the same shader/texture which are all not joined together, actually indexed triangle *lists* are best.

If you want to know more about how 3D hardware likes big batches of vertices to play with and hates small batches, take a look at the nVidia website, they have a couple of presentations on their site with details. IIRC one with a graph showing throughput versus batch size.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites