Hi to everybody!

I want to creat a running mesh on my screen and I have all the frames I need in a data structure.

When I load a mesh, I would like to delete the previous one… how can I do it?

Every mesh is loaded in this way:

void Mesh::Disegna(int n) {

int indice;

glBegin(GL_TRIANGLES);

for(int i=0; i minor nfac; i++)

indice = f[i].v0;

glTexCoord2f(s[indice].s0, t[indice].t0);

glVertex3f(mat[n].fot[indice].x, mat[n].fot[indice].y,mat[n].fot[indice].z);

indice = f[i].v1;

glTexCoord2f(s[indice].s1, t[indice].t1);

glVertex3f(mat[n].fot[indice].x, mat[n].fot[indice].y,mat[n].fot[indice].z);

indice = f[i].v2;

glTexCoord2f(s[indice].s2, t[indice].t2);

glVertex3f(mat[n].fot[indice].x, mat[n].fot[indice].y,mat[n].fot[indice].z);

glEnd();

}

Then I call this function passing the index i, which is the frame I want to load for the numbers of frame I have.

Thanks a lot

Mangusta