When he says
it loads perfectly he means that it is loading the data from the xml file into the string correctly.
The problem is this...
Code: Select all
node=smgr->addAnimatedMeshSceneNode(smgr->getMesh(model.c_str()));
You should know by now that the parameter to
getMesh() is the name of the file to load, i.e.
smgr->getMesh("../../media/dwarf.x"). Unfortunately you are passing a string that represents the file data. That won't work.
If you have the model data [the contents of a model file] in memory, you need to find a way to get that model data into an animated mesh, and then manually add that to the mesh cache. You would need to create an
IMemoryReadFile from your data, get access to the scene managers mesh loaders, and then try to load the mesh using the loaders. All that means more mods to the Irrlicht source to get what you want.
I'm curious why using IrrEdit isn't good enough for you. It already does all of this, and it works.
Travis