From Michael Platings, Converted std::fstream/ifstream/ofstream to osgDB::fstream/ifstream/ofstream and

fopen to osgDB::fopen to facilitate support for wide character filenames using UT8 encoding.
This commit is contained in:
Robert Osfield
2008-11-07 15:08:08 +00:00
parent 0ccf7d8383
commit 720551d549
76 changed files with 516 additions and 161 deletions

View File

@@ -6,6 +6,7 @@
#include <osgDB/FileNameUtils>
#include <osgDB/FileUtils>
#include <osgDB/fstream>
#include <osgDB/Registry>
#include <osgDB/Input>
#include <osgDB/Output>
@@ -47,7 +48,7 @@ class OSGReaderWriter : public ReaderWriter
osg::ref_ptr<Options> local_opt = opt ? static_cast<Options*>(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options;
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
std::ifstream fin(fileName.c_str());
osgDB::ifstream fin(fileName.c_str());
if (fin)
{
return readObject(fin, local_opt.get());
@@ -108,7 +109,7 @@ class OSGReaderWriter : public ReaderWriter
osg::ref_ptr<Options> local_opt = opt ? static_cast<Options*>(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options;
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
std::ifstream fin(fileName.c_str());
osgDB::ifstream fin(fileName.c_str());
if (fin)
{
return readNode(fin, local_opt.get());