Hi Carsten,

thank you for your help once again ;-)

Carsten Neumann schrieb:
> two quick questions:
> - do you do the navigation/rendering setup on aspect 1, then it is 
> possible/likely it gets overwritten when the sync from aspect 0 comes in.
>   
Yes, both is done on aspect 1 - I switched it to be done on aspect 0, 
the problem remains.
> - do you clear the changelist of aspect 0 after you have synced all 
> changes to aspect 1? Otherwise everything would be recopied all the time 
> making the above case where you overwrite changes made on aspect 1 even 
> more likely.
>   
The sync looks like this, everything looks fine for me. I'm not sure 
about the commitChanges() though, can they cause trouble regarding to 
changelists?

redraw() [thread A]
...
    // We need a sync of aspects for rendering, indicate it
    m_syncForRenderingNeeded = true;
   
    m_syncBarrierP->enter(2);   
    m_appThreadP->getChangeList()->applyAndClear();
    m_syncBarrierP->enter(2);   

    OSG::commitChanges();
...

update() [thread B]
...
     if (m_syncForRenderingNeeded)
    {       
       
        if (_pNavigator)
        {
            _pNavigator->updateCameraTransformation();
        }

        OSG::commitChanges();

        m_syncBarrierP->enter(2);
        m_syncBarrierP->enter(2);

        m_syncForRenderingNeeded = false;
    }
...
>       Hope it helps,
>               Carsten
>
>   

Cheers,
Christoph

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to