Every topic when talking about optimalisation, ppl recommends to batch those nodes what not moving, etc.
Now i wanted to try it out to see how it increases the performance, but couldnt find how to do it.
this is what i tried:
- Code: Select all
IAnimatedMesh* mesh = ((IAnimatedMeshSceneNode*)newObj->getNode())->getMesh();
if (!batchObj)
{
batchObj = device->getSceneManager()->addMeshSceneNode(mesh);
}
else
{
for (u32 n = 0; n < mesh->getMeshBufferCount(); n++)
{
batchObj->getMesh()->getMeshBuffer(0)->append(mesh->getMeshBuffer(n));
}
}
I guess its doing its job right, but the problem it isnt saving the positions (of course coz meshes dont have positions
So, how could i batch them, and keep my node positions, rotations, scales?


