On 11/14/06, Jean-Sebastien Guay <[EMAIL PROTECTED]> wrote:
It all depends on what data you want to watch, and what data you a associating with the OSG. I don't know anything about this so I can't really recommend anything.
Lost me. You can do your own traversals just by adding them to the main rendering loop.
Um... I don't really know where to start. It would be a huge change. Just think how many classes, how many attributes in each class. Now if you have flags for each one of these and global machasim to keep track of them, jikes.
> The OSG doesn't have such fine grained and pervasive observer support.
Ok, so can you suggest a good way of achieving what I want? I guess if I were to
traverse once every frame, then rebuilding my data would take as much time as
checking what has changed and updating it... So the easiest way is just to
clear it and start over each frame just before the draw traversal?
It all depends on what data you want to watch, and what data you a associating with the OSG. I don't know anything about this so I can't really recommend anything.
Basically I want an accurate representation of what is onscreen at each frame.
Is there a way of guaranteeing that my traversal will be just before the draw
traversal, so that nothing changes between when my traversal runs and the frame
is drawn?
Lost me. You can do your own traversals just by adding them to the main rendering loop.
> Adding it would be a huge task and would also add a significant overhead to
> the design and runtime performance.
I don't see the overhead being that significant. Basically it could just be
setting a dirty flag between frames when a node's attributes change and calling
the callback (if there is one) in the update traversal, then clearing the flag.
What added overhead there is would be entirely the responsibility of the
callback itself, and if there is no callback the only overhead would be setting
and clearing the dirty flag.
Um... I don't really know where to start. It would be a huge change. Just think how many classes, how many attributes in each class. Now if you have flags for each one of these and global machasim to keep track of them, jikes.
I don't know much about OSG's internals, but that could be a way of doing it. Of
course, if I'm the only one (or one of a very small group) to ask something like
that since the project started, that's another matter! :-)
Well its a request that has been made very occasionally. Perhaps once every few years. The pain is mostly definitely not worth the gain.
Now one could take a completely different tack, and that is to interface with the scene graph through a layer that tracks the changes and where you can implement your own observer code. For instance osgIntrospection does reflect all the classes and attributes of the scene graph, so if you wrote a layer to talked to the scene graph via this layer and monitored what was changed then you might well be able to do what you want. It'll be slightly remote, but could just work.
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
