replace more read*File() usage to readRef*File()

This commit is contained in:
Philippe Renon
2017-11-28 19:51:31 +01:00
parent 284f91b3e0
commit 2acddf66b1
8 changed files with 15 additions and 11 deletions

View File

@@ -196,7 +196,11 @@ int main( int argc, char **argv )
newCameraProperty = true;
cp = new gsc::CameraProperty;
osg::ref_ptr<osg::Node> node = fc->getInputFileName().empty() ? 0 : osgDB::readNodeFile(fc->getInputFileName());
osg::ref_ptr<osg::Node> node;
if (!fc->getInputFileName().empty())
{
osgDB::readRefNodeFile(fc->getInputFileName());
}
if (node.valid())
{
cp->setToModel(node.get());
@@ -522,7 +526,7 @@ int main( int argc, char **argv )
gsc::CaptureSettings* fc = itr->get();
screenShot->_frameCapture = fc;
osg::ref_ptr<osg::Node> model = osgDB::readNodeFile(fc->getInputFileName());
osg::ref_ptr<osg::Node> model = osgDB::readRefNodeFile(fc->getInputFileName());
if (!model) break;
viewer.setSceneData(model.get());