Hi Gerrit,

thanks a lot for changing the example. I erroneously assumed
that explicitly populating aspect 1 is not necessary,
as the scenegraph data is created BEFORE starting threads.
But it is necessary to get the changed camera data either.
Is all this information available in one place?
Especially, also
   OSG::WIN32Window *pLocalWin =
       OSG::convertToCurrentAspect<OSG::WIN32Window *>(win2.get());

How about the correct way of stopping and cleaning-up.
Setting the windows to NULL is enough?
"
        case 27:
        {
            delete mgr;
            win   = NULL;
            win2  = NULL;
        delete ract;

            OSG::osgExit();
            exit(0);
        }
"

Cheers,
Christoph


On 12.12.2011 13:26, Gerrit Voß wrote:
> Hi,
>
> On Mon, 2011-12-12 at 16:45 +0800, Gerrit Voß wrote:
>> > Hi,
>> > 
>> > On Thu, 2011-12-08 at 10:47 +0100, "Christoph Fünfzig" wrote:
>>> > > Hi all,
>>> > > 
>>>> > > >
>>> > > Attached is an example program using two windows:
>>> > > a GLUT window and a WIN32 window (created with WIN32 API directly; 
>>> > > sorry Windows only ;) ).
>>> > > The only place where aspects are assigned is the thread start
>>> > >     thread->runFunction(::ThreadProc, // thread function
>>> > >             1,            // aspect id
>>> > >             NULL);        // thread argument
>>> > > 
>>> > > I am totally unsure if it is correct like that? I would really 
>>> > > appreciate if someone
>>> > > who used it before could have a look ..
>> > 
>> > I'm looking into it, from a first look (windows version still building),
>> > I saw a two main things
>> > 
>> > you do not apply the changes from the app aspect to aspect 1 and your
>> > window in the second thread still uses the aspect 0 tree.
>> > 
>> > I'll try to update you example so that the main steps are in there.
> ok, attached a basic version that renders with the two windows. The main
> change is syncing from aspect 0 to aspect 1 between barriers and the
> use of the aspect 1 pointer for the second window.
>
> kind regards
>   gerrit
>
>

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to