Hi,

I have used the following code to load the test.wrl (File size 65 MB)

 

      mgr = new SimpleSceneManager;

 

      NodePtr root = Node::create();

      beginEditCP(root);

     root->setCore(Group::create());

      endEditCP(root);

 

      mgr->setWindow(gwin );

      mgr->setRoot(root);

 

      NodePtr scene = SceneFileHandler::the().read("test.wrl");

 

      beginEditCP(root);

            root->addChild(scene);

      endEditCP(root);

 

mgr->showAll();

glutMainLoop();

 

The model is shown in the viewer. It consumes 840,824 KB memory.

 

 

Next , I have removed the scene from the root node by using the following code..

      mgr = new SimpleSceneManager;

 

      NodePtr root = Node::create();

      beginEditCP(root);

     root->setCore(Group::create());

      endEditCP(root);

 

      mgr->setWindow(gwin );

      mgr->setRoot(root);

 

      NodePtr scene = SceneFileHandler::the().read("test.wrl");

 

      beginEditCP(root);

            root->addChild(scene);

      endEditCP(root);

 

            //removal code

      beginEditCP(root);

            while(root->getNChildren() > 0)

                  root->subChild(0);

      endEditCP(root);

 

mgr->showAll();

glutMainLoop();

 

Then the model is not seen in the viewer. But It is still using 532,084 MB memory.

Why is that?

 

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

Reply via email to