Jump to content
  • Advertisement
Sign in to follow this  
NiteLordz

Converting Tri Fans to Tri Strips or Lists

This topic is 5407 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, can someone help me out here. I have a Solid Leaf BSP and my leafs are rendered as Tri Fans. However, every call i make, only has 4 or 5 vertices in it, then i call the Draw Primitive. I have my leafs sorted by textures prior to rendering, to cut down on state changes. my question is, can someone help me out with an algorithm behind converting a tri fan of vertices to a tri list so that i can cache them all into a vertex buffer, then into an index buffer for a performance enhancement. thanks much

Share this post


Link to post
Share on other sites
Advertisement
you just loop for the numvertices -2, that also gives the number of triangles. The order of them will be 0, i+1, i+2 (you can get some paper to see how it works). This will convert them to lists, which is usually better than strips to reduce render calls.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!