[osg-users] Adding resource directory
Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding resource directory
Hi Anders, Welcome back to the fold :-) The OSG_FILE_PATH env var is just an initial setting for DataFilePathList in osgDB::Registry. You can set this programatically using osgDB::setDataFilePathList(...); This function can be found in include/osgDB/FileUtils. Robert. On Tue, Apr 28, 2009 at 12:51 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding resource directory
Sorry, found it now, getDataFilePathList()! Thanks (again). /A On Tue, Apr 28, 2009 at 2:05 PM, Anders Backman ande...@cs.umu.se wrote: Yes I saw that one, but what concerned me was the fact that I could only SET, not ADD.So if OSG_FILE_PATH is setting it to something, all I can do is overwrite it? /A On Tue, Apr 28, 2009 at 2:02 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, Welcome back to the fold :-) The OSG_FILE_PATH env var is just an initial setting for DataFilePathList in osgDB::Registry. You can set this programatically using osgDB::setDataFilePathList(...); This function can be found in include/osgDB/FileUtils. Robert. On Tue, Apr 28, 2009 at 12:51 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding resource directory
Yes I saw that one, but what concerned me was the fact that I could only SET, not ADD.So if OSG_FILE_PATH is setting it to something, all I can do is overwrite it? /A On Tue, Apr 28, 2009 at 2:02 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Anders, Welcome back to the fold :-) The OSG_FILE_PATH env var is just an initial setting for DataFilePathList in osgDB::Registry. You can set this programatically using osgDB::setDataFilePathList(...); This function can be found in include/osgDB/FileUtils. Robert. On Tue, Apr 28, 2009 at 12:51 PM, Anders Backman ande...@cs.umu.se wrote: Hi all. Ouch, its been years since my previous post on this list!! Glad to see that OpenSceneGraph is still alive and kicking! Anyway, I have a simple question I cannot find the answer to. Is it possible from app code to add (not replace) a directory (or a list of directories) where resources are to be found? (Resources: textures, models etc). Right now I have the option to use OSG_FILE_PATH, but that does not really work as I want to have an app that is just started from explorer by clicking on it. Sounds simple, but I am a little osg-rusty... /Anders ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org