Hi,

I am a new OSG user and wanted to load a VRML file and display it.
But the VRML plugin did only load the VRML file if it was located in the 
executables directory.

I opened up "ReaderWriterVRML2.cpp" and stumbled across the following lines: (I 
added some spaces after "file" because I received this forum message: "You must 
have 2 posts before you can post URL's/Links.")

Code:

#ifdef WIN32
if(unixFileName[1] == ':') // absolute path
fileName = "file : ///" + unixFileName;
#else
if (unixFileName[0] == '/') // absolute path
fileName = "file : //" + unixFileName;
#endif
else
// relative path
fileName = unixFileName;



I removed all of these lines except the last line:


Code:
fileName = unixFileName;



After recompiling the VRML plugin, it could load the VRML file from whichever 
location I specified.

I use OSG on Mac OS X 10.6.8, which does not seem to understand the "file : //" 
url in C++.
Does this behaviour only occur on my machine?
Why is "file  : //" even used at all? 


Thanks,
Michael

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41289#41289





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to