Code: Select all
IAnimatedMesh * hillplane = smgr->addHillPlaneMesh("myHill",
core::dimension2d<f32>(20,20),
core::dimension2d<s32>(40,40), 0, 0,
core::dimension2d<f32>(0,0),
core::dimension2d<f32>(10,10));
IMesh * mesh = hillplane->getMesh(0);
scene::ISceneNode * node = smgr->addWaterSurfaceSceneNode(mesh, 3.0f, 300.0f, 30.0f);
node->remove();
hillplane = smgr->addHillPlaneMesh("myHill",
core::dimension2d<f32>(40,40),
core::dimension2d<s32>(80,80), 0, 0,
core::dimension2d<f32>(0,0),
core::dimension2d<f32>(20,20));
mesh = hillplane->getMesh(0);
scene::ISceneNode * node = smgr->addWaterSurfaceSceneNode(mesh, 3.0f, 300.0f, 30.0f);
I've tried using combinations mesh->drop and hillplane->drop() to force it to deallocate, but it doesn't want any of it. Nothing I do seems to be able to deallocate that name entry or the mesh.
What am I doing wrong? Is there some way to remove a mesh and its name entry from the engine that I've missed somewhere?