Moved Registry::CacheHintOptions into ReaderWriter::Options

This commit is contained in:
Robert Osfield
2004-11-22 14:10:12 +00:00
parent 1ac452df69
commit a6369da4f4
20 changed files with 205 additions and 152 deletions

View File

@@ -66,8 +66,11 @@ osgText::Font* osgText::readFontFile(const std::string& filename)
{
std::string foundFile = findFontFile(filename);
if (foundFile.empty()) return 0;
osg::ref_ptr<osgDB::ReaderWriter::Options> options = new osgDB::ReaderWriter::Options;
options->setUseObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_OBJECTS);
osg::Object* object = osgDB::readObjectFile(foundFile, osgDB::Registry::CACHE_OBJECTS);
osg::Object* object = osgDB::readObjectFile(foundFile, options.get());
// if the object is a font then return it.
osgText::Font* font = dynamic_cast<osgText::Font*>(object);