Re: [osg-users] Running OSG in a trhead on Mac OSX

2016-09-26 Thread Kevin Gucwa
Hi Robert,

Thank you for the reply.  I had been coming to that conclusion myself but 
wanted confirmation from someone who knew more than I did.

I will look into catching all events from the main thread and passing them 
along.  I am not sure that it is even possible in my use case, but it is a 
great place to start and certainly better than rewriting the main logic of my 
program.

... 

Thank you!

Cheers,
Kevin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68767#68767





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Running OSG in a trhead on Mac OSX

2016-09-26 Thread Robert Osfield
Hi Kevin,

This issue with OSX is one we can't workaround, it's very much tied
into how OSX passes events from the OS onto applications.  We hit
against this issue when implementing osgViewer and trying to get the
multi-thread, mulit-context side work.  There isn't anyway to tell OSX
to give events to a thread other than the main one, the only way to
handle it is to catch all the events in the main thread and pass them
on to other threads to handle.  It's a pretty frustrating limitation,
no doubt you like many others, including myself have torn hair over
this limitation, alas there it's futile, you just have to work how
Apple wants you to write your applications even when it doesn't make
much sense for certain type of applications.

Robert.

On 23 September 2016 at 17:46, Kevin Gucwa  wrote:
> Hi,
>
> I am working on a project which requires me to put my OSG updates into a 
> thread so that the main thread can continue for integration into another 
> process.  All OSG events are done in the thread and locked with mutexes when 
> i need to add new nodes.  This works perfectly on Linux and Windows and is 
> deployed currently.  Thank you for such great software!  I am now working on 
> the port to OSX and running into the following issue.  When I run the 
> viewer->frame() updates in a thread, the keyboard and mouse inputs cannot 
> register into my GUIEventHandlers.  Running the frame loop from the main 
> thread and blocking my program allows events to be handled properly but stops 
> my actual code from progressing.
>
> I am new to Mac programming but have been using OSG for a few years now.  Can 
> anyone provide any guidance to Mac problems?  I don't have a minimal example 
> since it is integrated into a large project.  If necessary I can write a new 
> one which should demonstrate the problems.
>
> ...
>
> Thank you!
>
> Cheers,
> Kevin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68711#68711
>
>
>
>
>
> ___
> 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


[osg-users] Running OSG in a trhead on Mac OSX

2016-09-23 Thread Kevin Gucwa
Hi,

I am working on a project which requires me to put my OSG updates into a thread 
so that the main thread can continue for integration into another process.  All 
OSG events are done in the thread and locked with mutexes when i need to add 
new nodes.  This works perfectly on Linux and Windows and is deployed 
currently.  Thank you for such great software!  I am now working on the port to 
OSX and running into the following issue.  When I run the viewer->frame() 
updates in a thread, the keyboard and mouse inputs cannot register into my 
GUIEventHandlers.  Running the frame loop from the main thread and blocking my 
program allows events to be handled properly but stops my actual code from 
progressing.

I am new to Mac programming but have been using OSG for a few years now.  Can 
anyone provide any guidance to Mac problems?  I don't have a minimal example 
since it is integrated into a large project.  If necessary I can write a new 
one which should demonstrate the problems.

... 

Thank you!

Cheers,
Kevin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68711#68711





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org