From 13faad13e82059609398f85b205b6cb7aac442e5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 31 Aug 2007 20:30:45 +0000 Subject: [PATCH] Changed mutex reference to a mutex pointer to avoid problems with wrappers --- include/osgText/Font | 2 +- src/osgText/Text.cpp | 2 +- src/osgWrappers/osgText/Font.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/osgText/Font b/include/osgText/Font index 4a038276c..309f72071 100644 --- a/include/osgText/Font +++ b/include/osgText/Font @@ -164,7 +164,7 @@ public: typedef OpenThreads::Mutex FontMutex; /** Get the mutex that enables the serialization of calls to this font.*/ - FontMutex& getSerializeFontCallsMutex() const { return _serializeFontCallsMutex; } + FontMutex* getSerializeFontCallsMutex() const { return &_serializeFontCallsMutex; } protected: diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 416e7d256..3cf9c3f91 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -464,7 +464,7 @@ void Text::computeGlyphRepresentation() return; } - OpenThreads::ScopedLock lock(activefont->getSerializeFontCallsMutex()); + OpenThreads::ScopedLock lock(*(activefont->getSerializeFontCallsMutex())); // initialize bounding box, it will be expanded during glyph position calculation _textBB.init(); diff --git a/src/osgWrappers/osgText/Font.cpp b/src/osgWrappers/osgText/Font.cpp index 126102ab5..eadf16fc6 100644 --- a/src/osgWrappers/osgText/Font.cpp +++ b/src/osgWrappers/osgText/Font.cpp @@ -213,9 +213,9 @@ BEGIN_OBJECT_REFLECTOR(osgText::Font) __void__releaseGLObjects__osg_State_P1, "If State is non-zero, this function releases OpenGL objects for the specified graphics context. ", "Otherwise, releases OpenGL objexts for all graphics contexts. "); - I_Method0(osgText::Font::FontMutex &, getSerializeFontCallsMutex, + I_Method0(osgText::Font::FontMutex *, getSerializeFontCallsMutex, Properties::NON_VIRTUAL, - __FontMutex_R1__getSerializeFontCallsMutex, + __FontMutex_P1__getSerializeFontCallsMutex, "Get the mutex that enables the serialization of calls to this font. ", ""); I_ProtectedMethod4(void, addGlyph, IN, unsigned int, width, IN, unsigned int, height, IN, unsigned int, charcode, IN, osgText::Font::Glyph *, glyph, @@ -248,8 +248,8 @@ BEGIN_OBJECT_REFLECTOR(osgText::Font) I_SimpleProperty(osg::Texture::FilterMode, MinFilterHint, __osg_Texture_FilterMode__getMinFilterHint, __void__setMinFilterHint__osg_Texture_FilterMode); - I_SimpleProperty(osgText::Font::FontMutex &, SerializeFontCallsMutex, - __FontMutex_R1__getSerializeFontCallsMutex, + I_SimpleProperty(osgText::Font::FontMutex *, SerializeFontCallsMutex, + __FontMutex_P1__getSerializeFontCallsMutex, 0); I_SimpleProperty(osg::StateSet *, StateSet, __osg_StateSet_P1__getStateSet,