Hello Rene,

Rene Weller wrote:
> I have a multithreading problem with OpenSG.
> An application wants to use our CollDet-Library that is based on OpenSG.
> Rendering and other tasks are done by this application without using
> OpenSG, thus, the OpenSG data structures are mainly required as geometry
> containers for our library.
> Unfortuntatley, the application is heavily multithreaded and that seems
> to cause problems.
> The OpenSG geometry and transformation nodes are created in the
> main-function. Then the application creates several threads, that are no
> OpenSG threads. It crashes, when one of these threads tries to change
> for example the transformation matrix of one of the transformation nodes.
> 
> So my questions:
> - Can OpenSG handle threads that are not created by OpenSGs own
> multithreading architecture?

yes, but you have to tell OpenSG about the threads so that it can 
associate them with an OpenSG aspect.
You can use this to register an external thread (call it from the thread):
UInt32 aspectId = 0;
ExternalThread::get(0)->initialize(aspectId);

        Cheers,
                Carsten




------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to