View Full Version : Element-Arrays?

08-29-2003, 06:21 AM

I am wondering how most of you do this:
I have a mesh made up from triangles. The mesh includes an array of vertices, an array of normals and an array of UV-Sets. The problem is: Those arrays donīt have the same size. A Cube for example: 8 Vertices but only 4 Normals (or in my case: 24 Normals) and 24 UV-Coordinates. However, drawElements just lets me pass One Index-Array, so I guess all the arrays need to be the same size and order. This would mean, I would need 24 different vertices save, although I only use 8 different positions.
Is there any way around this?


08-29-2003, 06:41 AM
No, there is no way around this. Well, except for immediate mode, but that doesn't count.

If two vertices have the same position, but different texture coordinate, normal, and/or something else, you must duplicate that vertex.