Changed Font's mutex to become a static mutex shared between all instances of Font.

This ensures single threaded access of the freetype plugin.
This commit is contained in:
Robert Osfield
2007-09-01 15:24:22 +00:00
parent 13faad13e8
commit 3304646c4c
4 changed files with 12 additions and 10 deletions

View File

@@ -30,6 +30,12 @@ static osg::ApplicationUsageProxy Font_e0(osg::ApplicationUsage::ENVIRONMENTAL_V
static OpenThreads::Mutex s_FontFileMutex;
Font::FontMutex* osgText::Font::getSerializeFontCallsMutex()
{
static OpenThreads::Mutex s_FontCallsMutex;
return &s_FontCallsMutex;
}
std::string osgText::findFontFile(const std::string& str)
{
// try looking in OSGFILEPATH etc first for fonts.