Forgive my english, I'll do my best to explain the problem. I'm sure the problem is not in my code, because to its extreme semplicity.
I'm trying to convert an animated mesh from .mdl (it's an Half-Life model) to .x format. To do this I'm using Milkshape. I decompile the .mdl, get the .smd (which is the real mesh. it contains the mesh, animations and info about materials) and import into Milkshape. That's ok, I can see the mesh, textures and animations. Now, I try to export to .x with the exporter DirectX 8.0. Everything goes fine until there.
Now, I use this code to load the mesh.
Code: Select all
IAnimatedMeshSceneNode* node = scene->addAnimatedMeshSceneNode(scene->getMesh("osprey.x"));
while(device->run())
{
driver->beginScene(true,true,SColor(255,0,0,255));
scene->drawAll();
driver->endScene();
}
Ok...I run the program and... CRASH It crashes in that function, I checked. However, I don't understand. I do the same with another model made by me, and it's ok. I try with other models and it's ok. Nothing crashes. So i try to reproduce the crash with another model. That model contains two meshes. So, I tried to regroup those meshes to make only one. Perfect! No crashes.... But why? Irrlicht can't manage more than one meshes in a .x file? Impossible, I tried with other multi-mesh files, and that's ok.
Until now I don't understand where is the problem.
Had someone the same problem?
Thank you in advance.