Jump to content
  • Advertisement


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.

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

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 this post

Link to post
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 this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!