#### Archived

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

# Difference between indexbuffer and trianglestrip???

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

## Recommended Posts

What´s the difference?
http://www.shakazed.tk

##### Share on other sites
An idex buffer holds the indicies of the verticies in a vertex buffer that you want to be drawn (and in which order to be drawn).

A Triangle strip is a way of drawing verticies (indexed or otherwise). Samething for triangle fans, point lists, line strips, and trianges. they are just a way of rendering the data.

-James

##### Share on other sites
Triangle strips and index buffers both use a list of vertices: With triangle strips, the first three vertices define the first triangle, and every vertex after that is combined with the two preceding vertices to make a new triangle. As a result, all triangles are connected to each other in a long strip.

index buffers, however, define which vertices in each list to use per triangle. If we take a cube, for instance, you''d have a list of eight vertices (one for each corner of the cube):

0 - Vertex 1
1 - Vertex 2
2 - Vertex 3
3 - Vertex 4
4 - Vertex 5
5 - Vertex 6
6 - Vertex 7
7 - Vertex 8

And then a list of indices, three per triangle. So for instance 0 1 2 0 3 1 4 5 6 4 7 5 would draw four triangles: the first at vertices 0, 1 and 2, The second at 0, 3, and 1, the third at 4, 5 and 6, and the last at 4, 7 and 5.

As you can see, the triangles do not necessarily need to be connected to each other, as opposed to triangle strips.

See DirectX Graphics -> Programmer''s Guide -> Using Direct3D -> Vertex Data -> Device Supported Primitive Types for an explanation of triangle strips and fans, and DirectX Graphics -> Programmer''s Guide -> Advanced Topics -> Object Geometry -> Index Buffers for an explanation of Index Buffers.

##### Share on other sites
Ahaa! Thank you very much!

http://www.shakazed.tk

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 13
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632959
• Total Posts
3009465
• ### Who's Online (See full list)

There are no registered users currently online

×