[osg-users] NodeVisitors and Synchronization

Tomlinson, Gordon GTOMLINSON at overwatch.textron.com
Tue Sep 30 11:44:03 PDT 2008


Hi
 
You should not be doing this from the GUI thread, you should be doing
this typically in the OSG app thread, so you need to have some form of
messaging between the GUI and APP threads, such that you can kick off
your traversals at the appropriate time
 

Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com


__________________________________________________________
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 
 

________________________________

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
Argentieri, John-P63223
Sent: Tuesday, September 30, 2008 2:09 PM
To: osg-users at openscenegraph.org
Subject: [osg-users] NodeVisitors and Synchronization



Folks, 

Once I've called Node::accept(NodeVisitor&), does osgViewer::Viewer wait
until the update traversal to let the NodeVisitor perform it's
traversal? If I am in the GUI thread when I call accept(), does
NodeVisitor::apply happen in the GUI thread? Or does it happen in an
osgViewer thread based on the threading model?

I'm trying to make sure my NodeVisitor's have done their work before
reacting to osg::Camera's PostDraw callback. 

I am considering having nodes accept all visitors, waiting for a single
update callback, then registering for the osg::Camera's postdraw
callback. Do you guys think that will solve my synchronization problem?

Thanks, 

John Argentieri 
Software Engineer 
GENERAL DYNAMICS 
C4 Systems 
John.Argentieri at gdc4s.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/673e509d/attachment-0003.htm>


More information about the osg-users mailing list