Speed delta between Strips and Triangles

Recommended Posts

Well I don't know what to say but in my terrain rendering I been using strips, and decided to give triangles a shot and see really no difference in speed at best may be 1-3fps. Yes I am using VBO's and a IBO. I have 6 indices per quad for my triangle list and with strip I do have degenerate triangles. This is on a 7800GT... AFAIK if I am fillrate limited then this will not show any speed ups?

Share on other sites
Since you're already storing your vertex data on the video card, there's no real speedup to be obtained through vertex strips. It'd be different if the vertices weren't indexed, and were being dynamically generated. What you should REALLY worry about is ordering your vertices in a cache-friendly way.

Share on other sites
Just for everyones FYI I removed my bottleneck that causes my fillrate to go up and still no delta between the two methods. What order do you recommend then Sneftel? Thanks

Share on other sites
EDIT: nevermind, I misread. Well, check this out. Though it might be tricky to apply to terrains; I don't have much experience with that.

Share on other sites
Cache priming is quite useful for terrain optimization.

Share on other sites
To Promit, I am assuming this is more aimed at strips and not lists? Due to you were talking about strips with your posting.

What kind of speed up could one expect to see if the indices were cache friendly?

BTW I am using a patching system with 17x17 patch sizes...

Share on other sites
Think of it this way:

If you have a 17x17 block of vertices to render a 16x16x2 block of triangles:

With an ideal strip, you get one triangle per transformed vertex, plus two vertices per row of triangles. That makes for 16x16x2+16x2 transformed verts to render the block.

With an ideally sorted vertex cache optimized list, you can get much better than one triangle per transformed vert, because some triangles use all three vertices out of the post-transform cache. Thus, you only need to transform 17x17 vertices.

Thus, a triangle list, with an ideal vertex cache, is faster than a triangle strip. However, you could sort the strip, too, and get pretty much the same performance between the two.

I would just go with lists and not worry about it.

Share on other sites
This is the code I am using to create the list

			for(z = startz; z < endz-1; ++z)			{				for(x = startx; x < endx-1; ++x)				{					triBuff[currentIndex++] = x + (z * mapData.map_X);					triBuff[currentIndex++] = x + ((z + 1) * mapData.map_X);					triBuff[currentIndex++] = x + 1 + (z * mapData.map_X);					triBuff[currentIndex++] = x + 1 + (z * mapData.map_X);					triBuff[currentIndex++] = x + ((z + 1) * mapData.map_X);					triBuff[currentIndex++] = x + 1 + ((z + 1) * mapData.map_X);				}			}

Create an account

Register a new account

• Forum Statistics

• Total Topics
627735
• Total Posts
2978854

• 10
• 10
• 21
• 14
• 12