From Jan Ciger, "I am attaching a little hack from Jean-Sebastien Guay which allows

absolute paths to work on Windows."
This commit is contained in:
Robert Osfield
2007-08-15 15:11:48 +00:00
parent fe66501c47
commit 65ecea4e4a

View File

@@ -80,10 +80,14 @@ osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &f
// OpenVRML doesn't like backslashes, even on Windows
std::string unixFileName = osgDB::convertFileNameToUnixStyle(fileName);
#ifdef WIN32
fileName = "file://" + unixFileName;
#else
if(unixFileName[0] == '/') // absolute path
fileName = "file://" + unixFileName;
else // relative path
fileName = unixFileName;
#endif
std::fstream null;
openvrml::browser *browser = new openvrml::browser(null, null);