Hi,
a TriMesh
, by default, is not really suitable for that kind of thing. It only supports GL_TRIANGLES
, meaning that for each triangle there are 3 indices in the index buffer. There is no adjacency information available, because this is not stored in an OBJ file, anyway.
The way I see it you have 2 options:
- Create your own mesh from scratch.
- Parse the
TriMesh
one triangle at a time and try to reconstruct adjacency info from it. If two triangles share two vertices, you know they are adjacent to each other. Then build a new index buffer and set the primitive type toGL_TRIANGLES_ADJACENCY
.
-Paul