[osg-users] Reading files and callbacks
Tony Vasile
minghia at gmail.com
Thu Sep 10 20:49:02 PDT 2015
SMesserschmidt wrote:
> 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;
> }
> };
>
>
So how would I then process the nodes looking for comment strings in the various OpenFlight nodes?
------------------------
Tony V
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65110#65110
More information about the osg-users
mailing list