Hi Michael,

On 07/10/2011 03:48 PM, Michael Chechow wrote:
Hi,

..
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?

It is used because the correct local filesystem URI for a file is file:///somewhere/something.wrl for a file in /somewhere/something.wrl (absolute filename). OpenVRML does not take filenames, but needs full URIs because the files may come from the Internet as well.

For Windows there is a special case, because the file names on Windows are different, including the drive letters.

You can find an explanation of the whole thing here: http://en.wikipedia.org/wiki/File_URI_scheme

If the filename is relative (doesn't start with slash), then it should work just fine (see the else branch of the code just below the #endif).

What kind of filename did you try to use?

Regards,

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

Reply via email to