Hi Madeh, When you realize the viewer just pass in SingleThreaded. The osgcatch example has to do this for he same reasons as your app will need to, it does it this way:
// create the windows and run the threads, note has to be single threaded // due to use osgParticle viewer.realize(Producer::CameraGroup::SingleThreaded); Robert. On 8/10/06, Madeh El-Badaoui <[EMAIL PROTECTED]> wrote:
Hi Madeh, The osgparticleeffects is the example that should tell you all you need to know. As for the crash, it shouldn't crash, except when used mulit-threaded. The osgParticle library isn't generally thread safe so should only be used by a single threader viewer. osgProducer::Viewer tries to detect osgParticle usage and switch of multi-threaded cameras, but it can't catch things if you add the particles after the viewer.realize(). Robert. Thank you for the first reply, That's true, I am actually using multithreads. So Viewer will not detect osgParticle usage after the viewer.realize(). Thus creating osgParticle::ExplosionEffect variable everytime and adding it to the root (as in osgparticleeffects example) will cause an exception. So I am looking for a way to set the explosion again (with the same osgParticle::ExplosionEffect created at the begining), like just changing the position and set the explosion again. Cheers, Madeh _________________________________________________________________ Play Q6 for your chance to WIN great prizes. http://q6trivia.imagine-live.com/enca/landing _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
