Maybe I'm blind, but I cant find a way to unload or remove a mesh :_(
Why? I need to call ISceneManager::addHillPlaneMesh("MESHNAME",...) more than onces. But the 2nd call failed because a mesh with this name allready exists. I dont want to use different names.
Thx
Unload/ remove mesh
Well, I think the name is like an ID (idendifier) and in this case you can't use the same name for more than one mesh (node) !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Right, the name is used as an ID.
I guess calling mesh->drop(); would produce a nice error later because I didn't create the mesh with a 'createXXX' function and I changed the reference counter by this call.
Invisible nodes are not taking rendering performance but they are still in memory (ok, maybe not that much memory) and the name/ID is still engaged.
Since other addSceneNode functions (like addTerrainMesh) have the same problem I suggest to add a "remove-a-mesh" feature. But this might be impossible/difficult since you need to keep track which node relies on which mesh, don't you?
I guess calling mesh->drop(); would produce a nice error later because I didn't create the mesh with a 'createXXX' function and I changed the reference counter by this call.
Invisible nodes are not taking rendering performance but they are still in memory (ok, maybe not that much memory) and the name/ID is still engaged.
Since other addSceneNode functions (like addTerrainMesh) have the same problem I suggest to add a "remove-a-mesh" feature. But this might be impossible/difficult since you need to keep track which node relies on which mesh, don't you?
mmmmmmm, the problem is with the "core::array<MeshEntry> Meshes;" array in SCne, that stores the names of the meshes.
the mesh is succeful destroyed with the drop() command:
smgr->getMesh("MESHNAME")->drop();
But the array of names mantain the mesh... the array is private and there is no function that eliminates a name already registered... It's a bug.. the drop() command must destroy also the name of the mesh
the mesh is succeful destroyed with the drop() command:
smgr->getMesh("MESHNAME")->drop();
But the array of names mantain the mesh... the array is private and there is no function that eliminates a name already registered... It's a bug.. the drop() command must destroy also the name of the mesh