Added a mutex to protect the removal and addition of Uniform and Program to StateSet to avoid parents being invalidated when multi-threading.

This commit is contained in:
Robert Osfield
2012-08-14 20:15:00 +00:00
parent fb83c2b061
commit 52861ecbb0
2 changed files with 5 additions and 0 deletions

View File

@@ -187,6 +187,7 @@ protected:
osg::ref_ptr<osg::Texture2D> _fallbackShadowMapTexture;
typedef std::vector< osg::ref_ptr<osg::Uniform> > Uniforms;
mutable OpenThreads::Mutex _accessUnfiromsAndProgramMutex;
Uniforms _uniforms;
osg::ref_ptr<osg::Program> _program;
};