// We have a texture, try to load it
meshTextures[i] = TextureLoader.FromFile(device, @"..\..\" + mtrl[i].TextureFilename);
}
}
}
//Clean our mesh
Mesh tempMesh = Mesh.Clean(mesh,adj,adj);
//replace extsting mesh with this one
mesh.Dispose();
mesh = tempMesh;
//creat simiplification mesh
simplificationMesh = new SimplificationMesh(mesh,adj);