Changed CameraNode::getDataChangeMutex() to be a pointer rather than a reference to

get around osgIntrospeciton build problem with the OpenThreads::Mutex copy constructor being private.
This commit is contained in:
Robert Osfield 2005-11-23 16:32:55 +00:00
parent 3a62b5193c
commit e1dd759dd8
4 changed files with 5 additions and 5 deletions

View File

@ -305,7 +305,7 @@ class OSG_EXPORT CameraNode : public Transform, public CullSettings
/** Get the const post draw callback.*/
const DrawCallback* getPostDrawCallback() const { return _postDrawCallback.get(); }
OpenThreads::Mutex& getDataChangeMutex() const { return _dataChangeMutex; }
OpenThreads::Mutex* getDataChangeMutex() const { return &_dataChangeMutex; }
public:

View File

@ -1104,7 +1104,7 @@ void CullVisitor::apply(osg::CameraNode& camera)
osg::ref_ptr<osgUtil::RenderStage> rtts = dynamic_cast<osgUtil::RenderStage*>(camera.getRenderingCache(contextID));
if (!rtts)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(camera.getDataChangeMutex());
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*(camera.getDataChangeMutex()));
rtts = new osgUtil::RenderStage;
rtts->setCameraNode(&camera);

View File

@ -286,7 +286,7 @@ void RenderStage::runCameraSetUp(osg::State& state)
{
osg::notify(osg::INFO)<<"Setting up osg::CameraNode::FRAME_BUFFER_OBJECT"<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_camera->getDataChangeMutex());
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*(_camera->getDataChangeMutex()));
_fbo = new osg::FrameBufferObject;

View File

@ -135,14 +135,14 @@ BEGIN_OBJECT_REFLECTOR(osg::CameraNode)
I_Method1(void, setPostDrawCallback, IN, osg::CameraNode::DrawCallback *, cb);
I_Method0(osg::CameraNode::DrawCallback *, getPostDrawCallback);
I_Method0(const osg::CameraNode::DrawCallback *, getPostDrawCallback);
I_Method0(OpenThreads::Mutex &, getDataChangeMutex);
I_Method0(OpenThreads::Mutex *, getDataChangeMutex);
I_Method2(bool, computeLocalToWorldMatrix, IN, osg::Matrix &, matrix, IN, osg::NodeVisitor *, x);
I_Method2(bool, computeWorldToLocalMatrix, IN, osg::Matrix &, matrix, IN, osg::NodeVisitor *, x);
I_ReadOnlyProperty(osg::CameraNode::BufferAttachmentMap &, BufferAttachmentMap);
I_Property(const osg::Vec4 &, ClearColor);
I_Property(GLbitfield, ClearMask);
I_Property(osg::ColorMask *, ColorMask);
I_ReadOnlyProperty(OpenThreads::Mutex &, DataChangeMutex);
I_ReadOnlyProperty(OpenThreads::Mutex *, DataChangeMutex);
I_Property(GLenum, DrawBuffer);
I_Property(osg::GraphicsContext *, GraphicsContext);
I_ReadOnlyProperty(osg::Matrixd, InverseViewMatrix);