Thanks Robert, It looks like, when the particles are sorted, dead particles are given a depth of 0 so that they are automatically placed at the beginning of the list. This will be useful, I think, because it looks like the purpose of the _deadparts stack is to keep track of which particles are dead, so that when the ParticleSystem wants to reuse a dead particle, it doesn't have to do a linear search through the particle list to find them. However, if I know that the dead particles (if any) are at the beginning of the list, then I can just take a look at the first item on the list. If it's dead, resurrect it. Otherwise, create a new one.
So I might try subclassing ParticleSystem and overriding the CreateParticle method. In it, I'll check the sorting mode. If it's NO_SORT, then I'll use the _deadparts stack as usual. Otherwise, I'll just check the first particle in the list to see if it's dead. I won't have a chance to try this for a few hours because I have to run off to school, but I will let everyone know how it works out. Thanks again, Frank ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45987#45987 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org