#### Archived

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

# vertex buffer....indexbuffer??????

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

## Recommended Posts

hi could someone explain the deal with indexbuffers.........i know they have something to do with vertexbuffers, but ........um.......thats where u guys come in thanks

##### Share on other sites
Well it''s actually quite easy, vertexbuffers stores vertices and index buffer stores indices. I suppose that wasn''t very helpful so I guess that I should explain what indices are and what they''re used for.

You probably already know that vertices are different points in triangles if you use Triangle lists you have to have 3 vertices (3 points) for each triangle if you use triangle strips or fans (don''t use fans) you have 3 vertices + Xvertices where X is the amount of triangles - 1.

In particular when you use triangle lists this creates an awful lot of unuseful points for example a cube would require 36 points to form the 12 triangles (2 for each side).

The use of indices is to store a reference to a vertex for example the cube with the 36 points, we all know that a cube only has eight corners instead of storing 36 individual vertices store the 8 corner vertices and combine them in the order specified by the index buffer to create 3 individual vertices.

Hope this will help.
// Fredrik Nilsson

PS. I''d suggest that you study the subject a bit more, if you''re using c++ try DrunkenHyena.com or nexe.gamedev.net if you''re a VB programmer check out www.vbexplorer.com/directx4vb/. For c++ users I might add that Dx4Vb is also worth a look, the language isn''t the same but the theory is and the language is quite easily translated. DS.

##### Share on other sites
thanks fer the explanation....it actually did make me understand better:d

1. 1
Rutin
26
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 10
• 9
• 9
• 46
• 41
• ### Forum Statistics

• Total Topics
631751
• Total Posts
3002076
×