Jump to content
  • Advertisement
Sign in to follow this  
littlekid

Method of storing meshes

This topic is 4816 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

Just asking, does everyone normally store mesh in a vertex and index array and when you need to render them, you load the buffer and call DrawIndexedPrimitive. Or just store the mesh in thoes predefine structure like LPD3DXMESH and render them using DrawSubsets(). I know that in certain instance I need the vertex and index array of the mesh, for example when i want to build a bsp tree or octree, i would need its vertex and index. What kind of storage method is most preferable or better?

Share this post


Link to post
Share on other sites
Advertisement
Unless you need to do something special with all the data, probably the one that makes it easier for you to render it.

For instance, if you didn't know, in OpenGL, there is a function to draw indexed triangle lists, so, I keep everything, like you said, in 2 different arrays. Or, for more compilcated models, in an array of vertex objects and define the arrays for normal, vertices, tex coords, etc, and then draw all of them with a call to a single function.

If you didn't understand, or didn't read that last paragraph, put it in the one that makes it easiest to render.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!