There are 478 polygons in my scene without the sword.
The sword is 34 polygons.
If I add the sword to the scene,
Code: Select all
smgr->addMeshSceneNode(smgr->getMesh("C:\\sword.x"))
Now if I set the parent of the sword node as the joint node of the character hand,
Code: Select all
smgr->addMeshSceneNode(smgr->getMesh("C:\\sword.x"),
player.getNode()->getJointNode("handR"));
I tried it with a cube scene node from ISceneManager::addCubeSceneNode(), and the same thing happens: 478 + 12*6 = 550
Then I tried to attach the sword to a different part, let's say the head, and I then get 4 times more polygons for the sword.
If I set the parent of the sword as a node other than a joint node, there is no problem.
This "bug" is easily reproducible in only 3-4 or lines of code (load an animated mesh, attach a cube to a joint node and draw the poly count on screen), so try by yourself if you don't believe me...
So my question is: why does this happen? Is it the way it works in Irrlicht? Or is it a bug? Or am I doing something wrong?