Method of storing meshes

Started by
0 comments, last by Endar 18 years, 7 months ago
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?
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.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper

This topic is closed to new replies.

Advertisement