Replaced readImageFile() usage with readRefImageFile() to prevent threading issues with caching of imagery in the osgDB::Registry cache.

This commit is contained in:
Robert Osfield
2009-01-21 18:23:55 +00:00
parent e17535813f
commit 908432c732
21 changed files with 94 additions and 97 deletions

View File

@@ -197,13 +197,13 @@ static void load_material_texture( obj::Model &model,
if ( !model.getDatabasePath().empty() )
{
// first try with database path of parent.
image = osgDB::readImageFile(model.getDatabasePath()+'/'+filename);
image = osgDB::readRefImageFile(model.getDatabasePath()+'/'+filename);
}
if ( !image.valid() )
{
// if not already set then try the filename as is.
image = osgDB::readImageFile(filename);
image = osgDB::readRefImageFile(filename);
}
if ( image.valid() )