Re: [osg-users] Threadsafe IntersectionVisitor and LineSegmentIntersector?

2015-08-04 Thread Matthias Sattler
Thanks a lot for your hint about the viewer. In batch mode the viewer wasn't completely initialized and I initially looked at the wrong place. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64607#64607

Re: [osg-users] Threadsafe IntersectionVisitor and LineSegmentIntersector?

2015-08-03 Thread Matthias Sattler
Hi Sebastian, the sample code is called asynchronously from several compute threads. When I make sure that only one thread at a time calls accept() everything is rock solid (millions of calls). But it's running slowly and doesn't scale well with the number of cores. Without the lock the

Re: [osg-users] Threadsafe IntersectionVisitor and LineSegmentIntersector?

2015-08-03 Thread Sebastian Messerschmidt
Hi Matthias, Hi Sebastian, the sample code is called asynchronously from several compute threads. When I make sure that only one thread at a time calls accept() everything is rock solid (millions of calls). But it's running slowly and doesn't scale well with the number of cores. Without

[osg-users] Threadsafe IntersectionVisitor and LineSegmentIntersector?

2015-08-03 Thread Matthias Sattler
Hi folks, should the IntersectionVisitor and LineSegmentIntersector be threadsafe? With the multithreaded pseudocode below everything works fine with the ScopedLock. If I disable the ScopedLock I get wrong results. Thank you! Cheers, Matthias Code: osg::Vec3d dummy;

Re: [osg-users] Threadsafe IntersectionVisitor and LineSegmentIntersector?

2015-08-03 Thread Sebastian Messerschmidt
Hello Matthias, What do you mean by threadsafe in this context? By locking the mutex you achive nothing but subtle changes in timings, if you don't lock it somewhere else. Are you maybe refering to multiple threaded intersectors? Indeed the intersection should be safe if done after the