[osg-users] Reading files and callbacks

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Mon Aug 31 06:50:14 PDT 2015


Hi Tony

 From examples/osgcallback

class MyReadFileCallback : public osgDB::Registry::ReadFileCallback
{
public:
     virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& 
fileName, const osgDB::ReaderWriter::Options* options)
     {
         std::cout<<"before readNode"<<std::endl;
         // note when calling the Registry to do the read you have to 
call readNodeImplementation NOT readNode, as this will
         // cause on infinite recusive loop.
         osgDB::ReaderWriter::ReadResult result = 
osgDB::Registry::instance()->readNodeImplementation(fileName,options);
         std::cout<<"after readNode"<<std::endl;
         return result;
     }
};

P.S.
Could you please use the "Cite" functionality, as most of the old folks 
(no pun intended)  are using the mailing list, so keeping track is a bit 
easier if one makes clear what his question refers to..

Cheers
Sebastian
> Hi Sebastian,
>     Do you have a small example?
>
> Tony V
>
> ------------------------
> Tony V
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64958#64958
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list