[osg-users] Bug report

2009-06-10 Thread renlw
hi,
found a bug in osgParticle::PrecipitationEffect::traverse,  version 2.8.

code is:
   
void PrecipitationEffect::traverse(osg::NodeVisitor& nv)
{
if (nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
{
if (_dirty) update();

if (nv.getFrameStamp())
{
double currentTime = nv.getFrameStamp()->getSimulationTime();

   static double previousTime = currentTime;// here, if i have 
tow PrecipitationEffect object running, they share the same static 
previousTime, thus the second one would reach a delta of 0 always. maybe we can 
change it as a member variable instead.
double delta = currentTime - previousTime;
_origin += _wind * delta;
previousTime = currentTime;
}

return;
}___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] setUseLocalParticleSystem(false) make FireEffect can't be seen

2009-04-19 Thread renlw
Hi,
I add a FireEffect into scene under a MatrixTransform node, and 
setUseLocalParticleSystem(false) to let its father's matrix applied to the 
effect, code like this:
osgParticle::FireEffect* fire = new 
osgParticle::FireEffect(osg::Vec3d(0,0,0), 10.f);
fire->setUseLocalParticleSystem(false);
root->addChild(fire); // root is a MatrixTransform
But i cant find the fire in the scene then
   Could anybody be so pleased to show me the reason.

-renliwei<>___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgWidget memory leak

2009-03-27 Thread renlw
Hi,
I notice that calls like EventInterface::addCallback(new Callback(...)) 
would cause memory leak.
It use a list to manage the callback objects, and the list item is 
osg::observer_ptr, but not something like osg::ref_ptr. 
And observer_ptr doesn't do ref/unref to Reference objects like what ref_ptr 
does. 
So the callback objects can't be released automaticly.

-renliwei___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org