Hi Mike,
you can add an
osgDB::Registry::ReadFileCallback
and implement the readImage member function.
For registering it to the registry use:
osgDB::Registry::instance()->setReadFileCallback(myCloneReadFileCallback);
This will be triggered by the database-pager when loading the image.
It won't help you with the destination-problem however.
Cheers
Sebastian
Hi all!
I am finishing up some work which involves modifying nodes as they are
loaded via the database pager - I want to edit the data after it is
loaded, but before it is added to the scenegraph. I also need to know
the destination (future parent) node in the scenegraph where the
edited node will be located.
It looks to me like a suitable location for this work is pretty much
in the middle of DatabaseThread::run - after the node is loaded via
readNode (), but before it is added to the file cache. All the data I
need appears to be held in the DatabaseRequest object.
Is there another (simpler?) way of inserting my code into the loading
process?
If the middle of the run method is the best location, would a patch to
allow a optional callback function to be called be considered?
best wishes
Mike
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org