Hi Nguyen, There a range of things that can result in the readNodeFile() from return NULL.
You don't really provide any details about what type of file you are attempting to load, it may or may not be of a type that the OSG can load. Another alternative could be that you simply haven't set the paths up correctly to find the file. Another possibility is that you may not have set up the paths to the directory that contains the plugin directory. There are docs on getting started, and books. I would recommend having a look at these. Robert. On 31 October 2014 02:32, Nguyen Quang Nam <nguyenquang...@outlook.com> wrote: > Hi, > > I am a new OSG, nice to meet everyone! > > i has a problem when i do a MFC project. > > my osgDB::readNodeFile() always return NULL! (pic) > > > > sorry i can not upload a picture. This is link: ( space between > 'uphinhnhanh.' and 'com'. > > > Code: > void cOSG::InitSceneGraph(void) > { > mRoot = new osg::Group; > > mModel = osgDB::readNodeFile(m_ModelName); > if (!mModel) return; > > osgUtil::Optimizer optimizer; > optimizer.optimize(mModel.get()); > optimizer.reset(); > > mRoot->addChild(mModel.get()); > } > > > > uphinhnhanh. > com/images/500xNx98452265634OSGProb.png.pagespeed.ic.rdmCrAujLm.png > Please help me > ... > > > Thank you! > > Cheers, > Nguyen :? > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=61474#61474 > > > > > Attachments: > http://forum.openscenegraph.org//files/osgprob_320.png > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org