Saving a mesh and textures into a single file
glTF is capable if embedding both geometry and texture data in a single file. It also has binary version (*.glb). There are several open-source savers/loaders, one of them being header-only tinygltf by Syoyo Fujita.