Hi All,

As part of my work on osgViewer I thought rather than disabling
multi-threading when particle systems are used I'd fix the problem at
source and make osgParticle thread safe.  To do this I have added a
new type of mutex that allows single thread write, but multi-thread
read only usage, this new ReadWriteMutex is used in each
osgParticle::ParticleSystem object to marshal update and rendering of
the particle system.

This change has allow me to remove the old osgParticle detection and
theading disable hack in osgProducer::OsgCameraGroup, so it'll now
allow you to use particle systems fully multi-threaded.  The change
also allows me to keep the new osgViewer library clean of such hacks
too :-)

I have done testing on my dual core Althon X2 + 2x Geforce 7800GT
system under Suse 10.0, and so far everything is solid under
osgProducer based osgviewer and osgViewer based osgcamera examples,
both of which are running multi-threaded, multi-pipe on particle
systems without problem.

While my testing suggests things are now thread safe, there is no
guarantee so please test you apps.

Cheers,
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to