Updates to osgText and osgDB so that the loading of text fonts can use

osgDB::findFile() to locate font files from the OSGFILEPATH environmental
variable.
This commit is contained in:
Robert Osfield
2001-10-24 12:53:27 +00:00
parent 5853215f1c
commit a30a4132b8
3 changed files with 23 additions and 10 deletions

View File

@@ -63,6 +63,7 @@ static const char *s_default_dso_path = "/usr/lib/osgPlugins/";
static char *s_filePath = ".:";
#endif
static bool s_filePathInitialized = false;
void osgDB::initFilePath( void )
{
@@ -76,6 +77,7 @@ void osgDB::initFilePath( void )
{
notify(DEBUG_INFO) << "osgDB::Init(NULL)"<<endl;
}
s_filePathInitialized = true;
}
@@ -96,6 +98,8 @@ void osgDB::setFilePath( const char *_path )
strcat( buff, _path );
s_filePath = strdup( buff );
s_filePathInitialized = true;
}
@@ -152,6 +156,8 @@ char *osgDB::findFile( const char *file )
{
if (!file) return NULL;
if (!s_filePathInitialized) initFilePath();
char* newFileName = findFileInPath( file, s_filePath );
if (newFileName) return newFileName;