[osg-users] change model dynamically

2010-12-10 Thread lucie lemonnier
Hi, I want to change the 3D model dynamically at the runtime. I have inatialize my node at : _model = new osg::Node(); _model = osgDB::readNodeFile(model1.osg); and when I do a particular action, I would like that the 3D model changes, I write this : _model = osgDB::readNodeFile(model2.osg);

Re: [osg-users] change model dynamically

2010-12-10 Thread Vincent Bourdier
Hi Lucie, I think this is a simple C++ issue. First you create _model which is a pointer on a node. Then you make a new node and set _model to store its adress. Next, you load a new node and set _model to store it again. So the first thing is, you don't need to do _model = new osg::Node(); So