Hi all,

When copying (DEEP_COPY_ALL) the ExplosionEffect, I end up with the
runtime error about pure virtual function call. Debugging shows that
the complaint arises when ParticleEffect::setUpEmitterAndProgram()
is called at copy construction of ExplosionEffect (involved code
excerpts below):

ExplosionEffect::ExplosionEffect(
const ExplosionEffect& copy, const osg::CopyOp& copyop)
:   ParticleEffect(copy,copyop)
{
}

ParticleEffect::ParticleEffect(
const ParticleEffect& copy, const osg::CopyOp& copyop)
:   osg::Group(copy,copyop),
   // Sets several member variables ...
{
   if (_automaticSetup) buildEffect();
}

void ParticleEffect::buildEffect()
{
   setUpEmitterAndProgram();

   // Other code ...
}

Am I doing something wrong by trying to DEEP_COPY_ALL the
ExplosionEffect (or other kind of ParticleEffect)? Should ParticleEffect
in this copy-constuct situation call ExplosionEffect::
setUpEmitterAndProgram()? Your insight is much appreciated.

Thanks,
Sinisa

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

Reply via email to