Jump to content
• ### What is your GameDev Story?

• Advertisement

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

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

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

#### Share this post

##### Share on other sites
Advertisement

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.

#### Share this post

##### Share on other sites

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.

#### Share this post

##### Share on other sites

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*/.

#### Share this post

##### Share on other sites

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.

#### Share this post

##### Share on other sites

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).

#### Share this post

##### Share on other sites

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

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 15
• 9
• 11
• 9
• 9
• Advertisement
• ### Forum Statistics

• Total Topics
634134
• Total Posts
3015743
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!