#### Archived

This topic is now archived and is closed to further replies.

# Strips vs. List?

## Recommended Posts

Drilian    1067
Okay, two questions from a self-confessed Direct3D Newbie: 1. Which is more efficient? One call to DrawPrimitive with a TRIANGLELIST or a bunch of calls to DrawPrimitive with TRIANGLESTRIP (by a bunch of calls, I''m using the same model, but stripifying it if I use the latter). My semi-educated guess would be the second one, but I thought I''d ask to make sure (to help answer the question: I can''t imagine the face count on most of these models to be more than around 500 or so, absolute tops). 2. Given a list of vertices and faces, what''s the best way (or any way really) to convert it into a set of triangle strips? Thanks (in advance!) Josh

#### Share this post

##### Share on other sites
foobar    122
ok, this was not your question, but use indexed tri-lists if you can. they should be fastest.
if you cant for some reason, please post again.
nVidia docs say "if you think about using fans or strips there is something wrong with your engine" or similar *g*.

to your question:
i dunno which is faster and it will surely depend on how much vertices are duplicated and how big/small the actual batches are.
and on the driver. and on the hardware. and... -- ok, i think you got it.

bye,

--- foobar
We push more polygons before breakfast than most people do in a day

#### Share this post

##### Share on other sites
Wavewash    202
I had the same problem, I did multiple calls to a vertex buffer calling the strips individually and I found that it was slower for me because I made 32 calls. When I compiled it into one list with a triangle list and called it with indices it was almost 2 times faster. So try both and see how it works for you, I think it also depoends on the situation.
~Wave

#### Share this post

##### Share on other sites
Drilian    1067
Thanks!

That''s actually perfect Because that''s how I was setting up my data structures, with a list of vertices and a list of indices.
Thanks for the help

#### Share this post

##### Share on other sites
LordKronos    122
In these cases, you are probably better of making a single call using indexed triangle lists. However, when you do so, make sure to put your triangle in strip order. The reason is that video cards have a vertex cache of the most recently used verticies. The number of verticies in the cache is pretty small (for GeForce 2, I think it is effectively 10 verticies). If you can reuse a vertex that is in the cache, then you dont have to reupload the vertex to the graphics card, nor do you have to transform it again.

However, it does depend on how many strips you have and how large each one is. If you can get 2 strips of 1000 polys, you may be better off with lists. However, if you get 250 strips of 4 polys, you are better off with indexed lists. Of course the optimal # of polys per call varies from graphics card to graphics card. About 3 years back, I think the optimal # of polys per call was something like 300. I''m not sure what the optimal number is anymore.

#### Share this post

##### Share on other sites
VladR    722
Read my last thread regarding lists vs strips and indexed vs nonindexed. Youll get much of info there. Also there are some benchmarks, but it is regarding the terrain which means much more vertices than on some model, but youll get the point.

http://www.gamedev.net/community/forums/topic.asp?topic_id=76968

I can`t but recommend always to try different things yourself, store it in different directories and comment it well to see for yourself. It takes time but in the end it pays off.

#### Share this post

##### Share on other sites
Steveyboy    122
quote:

However, it does depend on how many strips you have and how large each one is. If you can get 2 strips of 1000 polys, you may be better off with lists. However, if you get 250 strips of 4 polys, you are better off with indexed lists. Of course the optimal # of polys per call varies from graphics card to graphics card. About 3 years back, I think the optimal # of polys per call was something like 300. I''m not sure what the optimal number is anymore

Eh?
Youre best off with longer strips i thought? So you can minimize the number of DIP calls???
The optimal number of verts in a VB is 5000 or something.

Steve