Максим Гаммер wrote:
>
> Smart pointer - osg::ref_ptr can not be applyed to osgParticle::Particle.
> This line works:
>
> osgParticle::Particle* ptemplate = new osgParticle::Particle;
>
>
> And this one doesn't (Visual Studio 2008)::
> osg::ref_ptr ptemplate = new osgParticle::Particle;
>
> Error description:
>
> >D:\DEVELOP\OSG\OpenSceneGraph-2.6.1\include\osg/ref_ptr(30) : error
> C2039: 'unref' : is not a member of 'osgParticle::Particle'
> >       
> D:\DEVELOP\OSG\OpenSceneGraph-2.6.1\include\osgParticle/Particle(48) :
> see declaration of 'osgParticle::Particle'
>
> >        D:\DEVELOP\OSG\OpenSceneGraph-2.6.1\include\osg/ref_ptr(30) :
> while compiling class template member function
> 'osg::ref_ptr::~ref_ptr(void)'
> >        with
> >        [
> >            T=osgParticle::Particle
> >        ]
> >        d:\maxlab\maxplayer
> 4.0\src\scene\particle\./InterfaceForParticle.h(61) : see reference to
> class template instantiation 'osg::ref_ptr' being compiled
> >        with
> >        [
> >            T=osgParticle::Particle
> >        ]
>
> For all other objects osgParticle::*
> (osgParticle::ParticleSystem,osgParticle::RandomRateCounter,osgParticle::ParticleSystemUpdater
> и т.д.) "smart pointer" osg::ref_ptr works.
>
I suspect that the Particle class isn't reference counted as potentially
thousands of particles can be generated very quickly and they can mostly
be managed by the particle system instance. Using reference counting
there wouldn't help. But Robert knows THE answer to this one, of course.

BTW, you sent a mail to the osg-submissions list, which is not meant for
OSG questions but only for sending code submissions that you want to
contribute.

Regards,
Paul
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to