I started four months ago my 3d engine, I optimized my mesh with display lists but I need dynamic mesh so I try to implement vertex array. My engine can import ASE file, so in my class mesh, there is a array of vertices and a face array with indices. I know I can only upload vertices to my 3d card with vertex array and face indices but how can I do for texture coordinate? I can’t get two texture coordinate by vertex as there are shared vertices … someone’s got an iD? I don’t want to put “brutal” triangles with 3 vertices by face …
Generally, you have a set of verices, and a set of indices used to build faces from the vertices. This is also how .ASE-files works. Several faces can share the same vertex. The coordinate of the shared vertex is always the same, independent of what triangle using it. But this does not has to be the case with texture coordinates. One vertex can have different texture coordinates, depending on what face you are drawing. This is why you can’t use texture coordinates in the same way as with vertices, in this case at least. And as far as I know, when loading .ASE-files, you have to store the shared vertices several times, so each version of the vertex gets it’s own set of texture coordinates. In other words, stright forward rendering without shared vertices, sorry.