# Concatenating indices for meshes

This topic is 1442 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm basically trying to get all the data from all the meshes and put them into a single buffer(a buffer for vertices,one for indices). The models are of TriangleList type.

Here's how I'm currently doing it:

vector<unsigned long> finall_indices;
for (long long i = 0; i < meshes.size(); i++){
for (long long s = 0; s < meshes.at(i)->index_queue.size(); s++){
}
}


However,there are some problems,like missing quads. The indices are fine,because I tested them when I did not put all the mesh data together.

What am I doing wrong?

To indices_before_adding should be added the nr of vertices in the last mesh,every time a new mesh's indices are added to the finall_indices mesh.

Edited by noatom