• Advertisement
Sign in to follow this  

sorting by state techniques

This topic is 4425 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, I have heard of a technique where you use 1 static vertex buffer for static geometry, and then build dynamic index buffers based on visibility and device state sorting. Is this technique worth it? This method seems good in that you can sort geometry by states easily, but won't it pretty much mess up any vertex cache reorganization opimization? Are there any other ways to sort and render geometry based on device states while still using static vertex buffers?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

You could also create 1 big index buffer, and simply issue different DIP call (assuming you use DirectX ^^) with the corrects start indices, number of primitives, etc. (this way, no need to recreate the index buffer)

The problem with that is vertex formats. You can't have different vertex format in the same VB, so you need to create as many VB / IB as you have different vertex formats.

Or you could create lots of VB / IB. This way is a little less optimal (well, depending on scenes, it can be a LOT less optimal ^^) but you don't have to care about vertex format, etc. ^^

Share this post


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

  • Advertisement