The problem with the system of particles:

in hiding the particle system and their subsequent screening creates a huge
number of particles (splash). But more than the big time difference between
concealment and display. The drawings depicted such a situation.

http://i35.tinypic.com/ridkhu.jpg
http://i33.tinypic.com/2nulhfd.jpg

The first figure shows the correct image, the second figure shows the
erroneous operation of the system of particles.

In addition, when a large number of particles occurs following warning:
Warning: State:: drawQuads (0, 72588) too large handle in remapping to
ushort glDrawElements.
Warning: State:: drawQuads (0, 72592) too large handle in remapping to
ushort glDrawElements.
Warning: State:: drawQuads (0, 72592) too large handle in remapping to
ushort glDrawElements.
Warning: State:: drawQuads (0, 72596) too large handle in remapping to
ushort glDrawElements.

fix this problem :


 inline int RandomRateCounter::numParticlesToCreate(double dt) const
    {
        _np += dt * getRateRange().get_random();
        int n = static_cast<int>(_np);
        _np -= n;
*if (n > getRateRange().maximum) *
* **{*
* **n = getRateRange().get_random(); //or .get_random *
* **_np=0;*
* **}*
        return n;
    }


in attached file....


-- 
Maxim Gammer

Attachment: RandomRateCounter
Description: Binary data

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

Reply via email to