Sign in to follow this  
goldie83

TriangleList to TriangleStrip converter

Recommended Posts

There's few libs:

https://github.com/spoonless/tristripper

http://www.nvidia.com/object/nvtristrip_library.html

 

NvTriStrip is significantly slower than Tanguy's tristripper, and works only with 16-bit indices. But its output often renders somewhat faster.

 

It might be that you'll benefit mostly because of triangles reordering, rather than because it will be rendered as strips.

It's unlikely your mesh might be expressed as single strip. So either there will be degenerate triangles connecting strips, or you'll have to draw mesh in multiple calls.

If you don't care about strips, those libs can generate optimized triangle lists.

Also there's another option for meshes that will be prepared offline - use AMD Tootle, it can optimize meshes not only for vertex/prefetch caches, but also for lesser pixel overdraw.

Share this post


Link to post
Share on other sites

Yeah - you want a good triangle list rather than a triangle strip, even if your target platform supports primitive restart to allow efficient stitching of strips, triangle lists can still outperform strips because they utilize the post transform cache better. This is a solid algorithm that generates good triangle lists without you needing to know the size of the GPUs post transform cache. https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html. tristripper is good too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this