Hello!
Thanks for the clarification; that very likely explains what I saw when
attaching a debugger.
The next two question that arise are: What is the correct "how" and "when"?
First, can manipulators be attached to any kind of "container" graph node
(i. e. Group/Transform/Geode), or are there certain restrictions.
Second, if I don't use viewer.run(), but a while loop that keeps calling
viewer.frame(): Where is the right place to add manipulators, before or
after requesting the next frame to be drawn? And, what mutexes/semaphores do
I have to lock/unlock to ensure that I don't break other operations on the
scene graph (though I up to now thought that the scene graph is only
manipulated by update/culling etc. traversals after a call to the frame()
function).
Thank you!
Fabian Aichele
----- Original Message -----
From: "Robert Osfield" <[email protected]>
To: "OpenSceneGraph Users" <[email protected]>
Sent: Friday, February 13, 2009 9:55 AM
Subject: Re: [osg-users] Problems with registering an osgManipulator
withviewer.addEventHandler() after calling viewer.run()
Hi Fabian,
You should be able to add event handlers after the viewer frame loop
has begun. However, it will depend upon how you go about adding it
and when. You need to be careful about not invalidating interators or
introducing threading poblems.
Robert.
On Fri, Feb 13, 2009 at 7:25 AM, Fabian Aichele <[email protected]>
wrote:
Hello!
I have a problem finding a working way to add register an osgManipulator
with the active viewer that contains the node to which I added the
manipulator instance. Instantiating the osgManipulator to a node in the
scene works (code modelled after the "osgManipulator" example), but as
soon
as I call viewer.addEventHandler() with an instance of my own class
derived
from osgGA::GuiEventHandler, the main application freezes and stops
responding to user input.
Is it possible to add a GUI event handler after starting a viewer with
viewer.run() via a call to viewer.addEventHandler() at all? If yes, how
do I
do that correctly?
Thank you!
With best regards,
Fabian Aichele
_______________________________________________
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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org