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


DrawPrimitive Calls

Recommended Posts

Yes, but on the 1001st time, it will crash your computer...

But seriously... Calling DrawPrimitive 100 times takes longer than calling it once and so on... Ideally, you want to push as many primitives out in a single call as possible. Like so (for single textured triangle lists)

DrawPrimitive(All triangles with texture 1)
DrawPrimitive(All triangles with texture 2)

You also want to sort by vertex shader, etc. Draw as much as possible per call and minimize the number of state switches (texture, shader, stream, etc.) you do.

Share this post

Link to post
Share on other sites