Added mutex to prevent multiple cull threads changing the MultiTextureControl at one time.

This commit is contained in:
Robert Osfield
2008-03-24 18:03:19 +00:00
parent 584882ad24
commit 26526038ca

View File

@@ -104,6 +104,8 @@ class ElevationLayerBlendingCallback : public osg::NodeCallback
return;
}
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
float deltaTime = 0.01f;
if (_previousFrame!=-1)
{
@@ -172,6 +174,8 @@ class ElevationLayerBlendingCallback : public osg::NodeCallback
float _animationTime;
osg::observer_ptr<osgFX::MultiTextureControl> _mtc;
Elevations _elevations;
OpenThreads::Mutex _mutex;
};