Added an osgDB::ReadWriteMutex to help manage the ability to have serialize
write to objects but allow multiple threads to read at once in a read only way.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include <osg/Vec3>
|
||||
#include <osg/BoundingBox>
|
||||
|
||||
#include <osgDB/ReentrantMutex>
|
||||
|
||||
namespace osgParticle
|
||||
{
|
||||
|
||||
@@ -163,6 +165,8 @@ namespace osgParticle
|
||||
virtual void drawImplementation(osg::State& state) const;
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
osgDB::ReadWriteMutex& getReadWriteMutex() const { return _readWriteMutex; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -201,6 +205,8 @@ namespace osgParticle
|
||||
int _detail;
|
||||
mutable int _draw_count;
|
||||
|
||||
mutable osgDB::ReadWriteMutex _readWriteMutex;
|
||||
|
||||
};
|
||||
|
||||
// INLINE FUNCTIONS
|
||||
|
||||
Reference in New Issue
Block a user