Fixed crash on exit issues with osgFX, osgParticle, osgSim and the osgforest example

This commit is contained in:
Robert Osfield
2019-01-07 17:46:02 +00:00
parent 5e9be10da6
commit 1c65815f4e
11 changed files with 150 additions and 16 deletions

View File

@@ -659,6 +659,8 @@ osg::BoundingBox osgParticle::ParticleSystem::computeBoundingBox() const
void osgParticle::ParticleSystem::resizeGLObjectBuffers(unsigned int maxSize)
{
Drawable::resizeGLObjectBuffers(maxSize);
_bufferedArrayData.resize(maxSize);
for(unsigned int i=0; i<_bufferedArrayData.size(); ++i)
{
@@ -668,6 +670,8 @@ void osgParticle::ParticleSystem::resizeGLObjectBuffers(unsigned int maxSize)
void osgParticle::ParticleSystem::releaseGLObjects(osg::State* state) const
{
Drawable::releaseGLObjects(state);
if (state)
{
_bufferedArrayData[state->getContextID()].releaseGLObjects(state);