Hi Senthil,
> Hi ,
>
>
>
> I am using the following statement to load a file.
>
> NodePtr scene = SceneFileHandler::the().read(“test.wrl”).
>
> How to clean the scene memory before loading the another file.
>
> Ie, is it possible to delete the memory of scene node manually.
if scene is your root node you can call subRefCP(scene) but it's better
doing something like this:
// create you own root node.
NodePtr root = Node::create();
beginEditCP(root);
root->setCore(Group::create());
endEditCP(root);
// set the root of the simple scene manager
mgr->setRoot(root);
NodePtr scene = SceneFileHandler::the().read(“test.wrl”)
beginEditCP(root);
root->addChild(scene);
endEditCP(root);
// do something ...
// now remove the old scene
beginEditCP(root);
while(root->getNChildren() > 0)
root->subChild(0);
endEditCP(root);
scene = SceneFileHandler::the().read(“test.wrl”)
beginEditCP(root);
root->addChild(scene);
endEditCP(root);
Andreas
>
>
> Thanks,
>
> Senthil
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users