• 13
• 12
• 9
• 10
• 13

# Terrain Strips

This topic is 3641 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Is it possible to draw an entire Terrain using a single triangle strip? I can't find a way. I'm currently drawing a triangle strip for every row in the map. Thanks in advance.

##### Share on other sites
Yes, using degenerate triangles. But you might be better off using an indexed triangle list, the speed will be almost identical, and they're much easier to deal with.

If you have the following vertices:
0---------1---------2---------3|         |         |         ||         |         |         ||         |         |         |4---------5---------6---------7|         |         |         ||         |         |         ||         |         |         |8---------9--------10--------11

You can have an index buffer containing something like:
4, 0, 5, 1, 6, 2, 7, 3, 3, 8, 8, 4, 9, 5, 10, 6, 11, 7
Effectively, you put two backfacing triangles in the buffer so you can get to a new strip.

Actually, the more I look at that, the more I think I screwed it up, maybe someone else can confirm [smile]

##### Share on other sites
Ingenious!

It Works.

:)

I'm ashamed to say I used to be doing one draw call per quad and using set texture, until I found that it was the slowest thing in my rendering loop, despite being low-poly. Now the entire thing in one!