Hi Renan,

Would it be possible to poll the device on each new frame?  The is
what osgViewer does internally for keyboard and mouse events, each
frame eventTraversals() is called this goes and polls for events.  In
your own frame loop you could do your own polling.  The osgviewerSDL
examples has an example of polling of events outwith of osgViewer.

If you can avoid needing an extra thread to poll the events then
you'll keep life simpler, as threading while perfectly doable does add
its own very steep learning curve.

Robert.

On Wed, May 7, 2008 at 1:31 PM, Renan Mendes <[EMAIL PROTECTED]> wrote:
> Thanks, Robert, for the tips. My intention when using multithreading is to
> try and solve a problem about an input device (I don't know if you remember
> me posting it). Well, the thing is, I'm putting the function that gets my
> device's output in the FRAME loop. But it locks the normal execution of my
> application if I don't touch (i.e. activate) my input device. That's why I
> needed another thread: to get another 'route' when my device wasn't
> activated.
>
> I don't know if you or Paul have already suggested that I added my class as
> a new Event Handler to the viewer doing some modifications which I don't
> recall. I'll look into the archives for that message, and perhaps I'll
> continue that topic to get some more details abput your solution.
>
> Thanks again.
>
> Renan M Z Mendes
>
> _______________________________________________
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to