[osg-users] can no longer set an update visitor
Robert Osfield
robert.osfield at gmail.com
Sun Aug 12 02:47:39 PDT 2007
Hi Mathias,
On 8/12/07, Mathias Fröhlich <Mathias.Froehlich at gmx.net> wrote:
> A recent change to osg-svn removed all possibilities in an osg::Viewer to set
> the update visitor to a custom implementented derived class.
>
> Flightgear currently uses such a beast and needs to set that.
>
> Do you plan to restore such a setter in any class you currently refactor?
Actually the refactor is meant to provide, amoung other things, the
ability to set the UpdateVisitor, EventVisitor and DatabasePager all
via View(er) public methods. The key is that I've just moved the
setUpdateVisitor method from Scene into View.
The changes also move the Scene object a bit further into the
background as an implementation detail, it effectively binds a
particular scene graph with its database pager. The new code now
shares Scene objects between Views correctly, something it didn't do
before, this fixes some potential bugs when sharing scenes in a
CompositeViewer. An empty Scene object is also now default
constructed in the View(er) and allows one to set the UpdateVisitor
and DatabasePager paged prior to assigning a scene graph.
With these changes I've now taken osgViewer closer to where I a first
hoped to be able to get to, with things hanging together more
coherently. I of course didn't know exactly what the API would
finally look like, it took biting little bits off a time, trying
different class relationships and testing out in the real-world to
know what it should finally be.
There are a still a few loose ends in osgViewer, such as configuration
file support, window inheritance under X11, the
CullThreadPerCameraDrawThreadPerContext threading model to debug, but
overall we are now much closer to the destination with whats in SVN,
and the bits of API flux that we've see should start calming down.
Robert.
More information about the osg-users
mailing list