PDA

View Full Version : Vertex arrays, structures,...



Firestar
11-06-2001, 12:26 AM
Hi, I was just wondering what is the the best structure to use for drawing polys. So if I was using VAs I would have to make a big vertex kaboodle and then in each triangle have indices to 3 vertices. OK, so far, so good. But here are my questions:

1.) What's the best structure for the Vertex (3d coords, texture coords, normal coords, bone pointer)? All in one structure, or just pointers to the real data?

2.) What if I would use CVAs or VAR. Is it then still possible to get the coordinates, because isn't then all the vertex data stored in the video ram? I would still need the coordinates of the vertices to do collision detection or is there a way around this?

3.) What's the best 3d model format to use with this (3ds, obj), but as far as I know none of them support triangle strips?

I would really apreciate to get some code for the structures for the triangle and vertices, because I'm stuck and can't build on the really interesting things if I don't have a decent and extensible base structure.

Thanks

Firestar

ByteZero
11-06-2001, 01:27 AM
I have written a small prog that use Vertex Arrays to create a cherry.

I would mail it to you, so fast I can do
maybe it would be the code you want

Firestar
11-06-2001, 02:18 AM
Thanks, I sent you my mail address.