Hello forum

Is there any difference between these following:

1. osg::ref_ptr<osg::StateSet> nodess3  = new
StateSet((myshapegeode3->getOrCreateStateSet()));
2. osg::ref_ptr<osg::StateSet>
nodess3((myshapegeode3->getOrCreateStateSet()));

The the second one works fine

and the first one gives error:
************************************************************************************
Game.cpp: In member function 'virtual osg::ref_ptr<osg::Node>
Game::createSceneGraph()':
Game.cpp:89: error: no matching function for call to
'osg::StateSet::StateSet(osg::StateSet*)'
/usr/local/include/osg/StateSet:54: note: candidates are:
osg::StateSet::StateSet(const osg::StateSet&, const osg::CopyOp&)
/usr/local/include/osg/StateSet:53: note:
osg::StateSet::StateSet()
make: *** [Game.o] Error 1
*************************************************************************************
In both cases it is taking a pointer to a State to instantiate a new
StateSet

Regards
Sajjad
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to