multiple drawprimative or batch?

Started by
1 comment, last by dynamicman 22 years, 4 months ago
lets say that I have triangles with no particular order in a vertex buffer that I need to render... for example... T = triangle that I need to draw N = triangle that I do NOT need to dra TTTTT NNNN TTTTTTTTT NN TTTTTT NN TTTTTTTTTTTTT whould it be better to call drawprimative multiple times (doing the appropriate skips) or should I batch these together in another vertex buffer and draw the whole thing all at once? I guess what I''m saying is, in a huge vertex buffer (1000''s) would it be better to batch (lock, copy, unlock) or call drawprimative multiple times? Whould batching make even more sense for indexed primatives (less copy overhead for a short/int than a full vertex)? Thanks!
Advertisement
the trick is to make sure the triangles in the vertex buffer ARE IN a particular order. also if its for particle engine, look at the partilce sample in the sdk 9well even if your not doing a particle engine) it explains how to render massive amount of triangles that are all dynamic.
(sorry, but I'm at work, but I'll check out the examples when I get home, but...)

ok, what if these triangles (T) are in batches already? Lets say that each T is 500 primatives. Would it be more efficient to copy (lock, copy, unlock) or do multiple drawprimative?

And for indexed primatives doesn't this make lots of sense? (since copying shorts are a lot quicker than calling drawindexedprimative)

Edited by - dynamicman on December 10, 2001 5:07:44 PM

This topic is closed to new replies.

Advertisement