Hi Alan, As Bryan wrote, what you need is to write a custom osgDB::Registry::ReadFileCallback that will intercept all DB calls, you then leave it up to Registry itself to the do the reading from the plugin, but then you process the loaded data before passing the end result back from the callback. Have a look at the ReadFileCallback implementation and study the default implementations, this should give you a clue how to put it together.
Robert. On Mon, Apr 27, 2009 at 10:40 PM, Alan Ott <[email protected]> wrote: > Hello, > > I'm using PagedLOD to load terrain tiles off disk. The problem I have is > that before I want the tile to actually render, I want to do a setup of the > tile (to look up certain control nodes and set switches according to the > current state of the system (eg: day/night mode, etc)). > > So on my own update(), I check to see if each PagedLOD has just loaded, and > if it has, I run the initialization on it. The problem is, when a tile gets > loaded, it is rendered for one frame _before_ I can do my initialization on > it. So for one frame, it is drawn wrong, then the next frame, it is drawn > right. > > I thought I might be able to get around this by setting the Node Mask to 0 > until it was initialized, but that seems to just keep the tiles from getting > loaded entirely (because the update traverser isn't getting into the > PagedLOD either). > > Do any of you have any ideas of what I could try to do to get around this? > Is there some value of the NodeMask that I could use to enable update but > not draw? Such a value did not seem to be documented in the API. > > Thanks for all your help, > > Alan. > > > _______________________________________________ > 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

