Sign in to follow this  
MisterHeadache

Drawing terrain from non-triangle strip friendly source

Recommended Posts

MisterHeadache    122
I need to draw terrain that has a mesh that looks like this (sorry for the old school grafix): -------- |\|/|\|/| -------- |/|\|/|\| -------- |\|/|\|/| -------- |/|\|/|\| -------- Terrain mesh that is "friendly" for triangle strips does not have the alternating diagonal pattern and looks more like this: -------- |\|\|\|\| -------- |\|\|\|\| -------- |\|\|\|\| -------- |\|\|\|\| -------- Any tips on how to generate a vertex buffer and an index buffer to draw this kind of terrain? Thanks!

Share this post


Link to post
Share on other sites
Don't use a fan! You want each draw call to draw hundreds or thousands of triangles. Use a triangle list. If you're creative with your index generation you can optimize for vertex cache hits (a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=371052&whichpage=1�">See discussion here or See JollyJeffers benchmark, which implies the fancy technique requires a fairly hefty batch size for any benefit.

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