Added --file-cache directoryname command line option support to readNodeFiles(ArgumentParser&)

to make it easier to specify a local file cache, in place of the default OSG_FILE_CACHE
env var.
This commit is contained in:
Robert Osfield
2008-05-13 14:08:32 +00:00
parent 0ed71961d4
commit 83f6f13914

View File

@@ -129,6 +129,14 @@ Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const ReaderWriter::Op
std::string filename;
while (arguments.read("--file-cache",filename))
{
std::string str("OSG_FILE_CACHE=");
str += filename;
putenv(strdup((char*)str.c_str()));
}
while (arguments.read("--image",filename))
{
osg::ref_ptr<osg::Image> image = readImageFile(filename.c_str(), options);