IAnimatedMesh* Player = smgr->getMesh("./models/test.x");
I encoded my meshs and other files and saved it to my harddrive. In my game I decode them and save them in temporary files. Now the temporary files contain my original meshs, and doesn't save it to my harddrive, so it's hard to get them. Only the pointer shows to them. But how could I load my decoded meshs from my RAM with GetMesh() and these pointers?
Actually this sounds more like you want to use a fileArchive. check the archive interface if that would make your life simpler.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
No, i don't want to use a FileArchive like *.zip or others. Just the single files. The code was only an example and has nothing to do with my intention.
I only try to load a file into the memory and use it from there and not from my harddrive. The code shown above should realize this, but it doesn't seem to work and I can't see, why...
Lunacore wrote:No, i don't want to use a FileArchive like *.zip or others. Just the single files. The code was only an example and has nothing to do with my intention.
I only try to load a file into the memory and use it from there and not from my harddrive. The code shown above should realize this, but it doesn't seem to work and I can't see, why...
Well you are probably loading the file from the harddrive at somepoint or from a server doesn't matter.
The IArchive interface can make it seamless for you so that you don't have to do this tricky stuff when calling get mesh.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
virtual IReadFile* irr::io::IFileSystem::createMemoryReadFile ( void * memory,
s32 len,
const path & fileName,
bool deleteMemoryWhenDropped = false
) memory,: A pointer to the start of the file in memory
So I use the pointer of the temporary file from the memory. Is this wrong?
yeah that is wrong. FILE is a pointer to the files io. its not the file in memory its just an interface to the file. you have to load the file completly into memory to use that function.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.