Thanks.

2009/1/20 Robert Osfield <[email protected]>

> HI Gammer? Max?
>
> osgParticle::Particle is deliberately designed to not be used with ref
> counting as individually allocating particles is very expensive, and
> they are also slower to access on mass due to lack of cache coherency.
>  The most efficient way to manage objects that are managed as large
> batches is avoiding individual allocation on the heap.
>
> Robert.
>
> 2009/1/19 Максим Гаммер <[email protected]>:
> > 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.
> >
> > p.s.
> > VS 2008
> > OSG v 2.6.1
> >
> > --
> > Gammer Max
> >
> > _______________________________________________
> > osg-submissions mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>



-- 
Гаммер Максим Дмитриевич
Начальник отдела ИТ НИИ ЭОР
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to