• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

# What the diffrerences between list and strip(specific to primitiveTopology) when i using DrawIndexed rather than Draw?(D3D11)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

### #1soloman  Members

Posted 26 March 2014 - 06:20 AM

In my opinion, list and strip is the same thing when i using index to specify the trangles.

It's different just in the call Draw().

And i think the list and strip.etc. are kinds of hiding index just for draw some simple two-dimention figures.

If my opinion is totally mistaken, please explain the differences between them when i already have the index data and tell me when to use list or strip?

Hope U understand what i am taking about.(my suck english...)

Edited by soloman, 26 March 2014 - 06:22 AM.

### #2NightCreature83  Members

Posted 26 March 2014 - 07:31 AM

The difference is in how it interprets the specified index buffer, in the case of list it will read 3 verts each time and create a triangle with them these don't have to be connected to each other. In the case of a strip the triangle are connected to each other, and such will after reading the initial three discard the first one and read the next index in the Index buffer.

So in a list a square with 4 verts would need 6 indices to be able to be rendered properly by drawIndexed and would look like 123341 in the case of a triangle strip you only have to provide 4 indexes in the form of 1234.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max

### #3Buckeye  GDNet+

Posted 26 March 2014 - 07:38 AM

You are correct that both forms have a buffer of vertices and a buffer of indices, and the indices specify 3 vertices per face. But that's where the similarity ends.

I don't know about D3D11 in particular, but a trianglestrip can be more efficient in the pipeline because two of the vertices for each triangle have already entered the pipeline.

A trianglestrip also requires that the same vertex (position, normal, texcoords, etc.) be used for adjacent triangles. In some cases, for instance - a cube with adjacent faces which are at right angles, a trianglelist provides for rendering two vertices at the same position, but with normals at right angles, and with different texture coordinates applied to adjacent faces.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

### #4soloman  Members

Posted 26 March 2014 - 11:10 AM

Tks，man.By the way,I am wonder that if i extract data from obj file,what kinda primitive type i should deliver to IA stage?(tri-list or tri-strip)/*YOU CAN assume that i use the 3DMAX*/.

### #5Buckeye  GDNet+

Posted 26 March 2014 - 11:38 AM

Tks，man.By the way,I am wonder that if i extract data from obj file,what kinda primitive type i should deliver to IA stage?(tri-list or tri-strip)/*YOU CAN assume that i use the 3DMAX*/.

I'm not familiar with obj file specs or 3DMAX. However, to use a triangle strip, rather than a triangle list, you'll have to analyze the incoming data to ensure it can be used as a trianglestrip. If you're going to be importing obj data, you'll need to review the file specs in any case.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

### #6DiegoSLTS  Members

Posted 26 March 2014 - 12:18 PM

If you read an obj file (and as far as I know, any other file format) you should use list instead of strip. The obj file stores a list of vertex coordinates and then a list of faces. You should read each line that represents a face and send the vertex indices for that face to be drawn.

A list is more general so you can draw anything, you'll probably use other drawing methods if you know exactly what you're drawing (if you want a rectangle use strip, if you want to make an hexagon it's easier with a triangle fan, etc).

### #7mhagain  Members

Posted 26 March 2014 - 02:44 PM

You are correct that both forms have a buffer of vertices and a buffer of indices, and the indices specify 3 vertices per face. But that's where the similarity ends.

I don't know about D3D11 in particular, but a trianglestrip can be more efficient in the pipeline because two of the vertices for each triangle have already entered the pipeline.

Almost, but not quite.  In both cases, and via DrawIndexed, the index buffer is actually being used to control the vertex cache, so a list can also skip transforms for potentially 0, 1, 2 or even all 3 of the vertices in a triangle (a strip can only ever skip 2).

A strip can save index bandwidth because it just needs one additional index to fully specify a new triangle.  A list is more flexible and potentially has better vertex reuse, but needs 3 indices to fully specify each triangle.  Pick whichever best suits your source data.

Edited by mhagain, 26 March 2014 - 05:03 PM.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.