Hi Carsten, Carsten Neumann schrieb: > > hm, thanks for posting these. I still suspect that some information is > not synced in the right way between the aspects. > How does your app handle input from the user? I assume it first > receives it in aspect 1 where the Qt GUI is running, but how do you > get it to aspect 0? In the example I just manipulated the scenegraph > in aspect 1, but making changes in more than one aspect and merging > them back is a tricky business unless you are taking care to work on > different parts of the scene. > The alternative would be to set up some communication between the > threads and forward input from aspect 1 to aspect 0 and only make > changes to the scene there, while aspect 0 focuses on rendering. In > that case you'd only pull changes from aspect 0 into aspect 1. > > Hope it helps, > Carsten thank you very much for your little example, it really helped me to clear up my syncing a little bit. Sadly the render problem persists and therefore I investigated almost the whole day to nail it down - you guess it, without success. This is how things are being setup and synced right now:
All are "MT" pointers except for: * OSG::RenderAction * OSG::Navigator This should not be a problem, they are created and used only by the thread associated with aspect 1. The sync order runs as described below. I entered every OpenSG related action and divided them up in three phases: Startup, input happened, model loaded <step> (aspect) action -------------------------------------------------------------------- a) Startup 1. (0) osgInit(); 1. (0) create passive window 2. (0) signal sync from (0)->(1) needed 3. (0) wait for (1) to sync from (0)->(1) 4. (1) OSG::ExternalThread::get( "GUIThread" )->initialize(1); 4. (1) sync (0)->(1) [ applyAndClear() ] 5. (1) setup cart and core 6. (1) setup roots(nodes) and headlight 7. (1) setup camera 8. (1) setup renderaction 9. (1) setup viewport 10. (1) initialize passive window 11. (1) signal sync from (1)->(0) needed 12. (1) wait for (0) to sync (1)->(0) 13. (0) sync (1)->(0) [ applyAndClear() ] b) Running (input happened) 1. (1) signal sync from (1)->(0) needed 2. (0) wait for (1) to be ready to sync from 3. (1) gets ready for sync 4. (0) sync (1)->(0) [ applyAndClear() ] c) Loading model on (0) 1. (0) signal sync (0)->(1) needed 2. (0) wait for (1) to sync 3. (1) sync (0)->(1) [ applyAndClear() ] -------------------------------------------------------------------- Hopefully you are able to see whats hidden for me... 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
