Excellent. I'll work on this and hopefully have something to submit in the
next few days.

For my purposes, I'd prefer automatic loading via an env var, but I'll
proceed with phase I first and then add the env var support later.

The file location can be arbitrary, the Registry would just search for it
using OSG_FILE_PATH.
   -Paul


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Robert Osfield
> Sent: Thursday, February 01, 2007 1:56 AM
> To: osg users
> Subject: Re: [osg-users] extension alias configuration file
> 
> Hi Paul,
> 
> On 1/31/07, Paul Martz <[EMAIL PROTECTED]> wrote:
> > Hi Robert -- To develop a new plugin that supports many 
> extensions, I 
> > need to edit Registry.cpp to add the aliases, but not check it in 
> > because, after all, this is development. This is doable, though 
> > potentially an issue keeping current with CVS.
> >
> > Rather than edit the code I was considering implementing a 
> > configuration file, simple space-separated list of "map" 
> extensions to 
> > "to" extensions, which (if present) would get loaded in the 
> Registry's 
> > constructor, parsed, and added to the _extAliasMap. Does this sound 
> > like a reasonable idea? If so, I'll implement it.
> 
> This sounds OK, the loading needn't be an intrusive change to 
> Registry.cpp, the loading could be done externally and the 
> settings passed to the Registry by the application.
> 
> The next question would be does one want to automatically 
> check for such a configuration file in all OSG app, or have 
> an env var point to such a file if it did exist.  If its a 
> standard check then where would we put the file by default, 
> in the bin directory? in the plugins directory - under 
> windows I recall that they are one of the same.
> 
> Perhaps as a first pass you could modify osgDB::Registry so 
> that has an extra readPluginAliasConfigurationFile(const 
> std::string&) method, and let the application call this 
> explictly.  Then if deemed approrpriate we could add a check 
> against an OSG_PLUGIN_ALIAS_CONFIGURATION_FILE on the 
> Registry constructor, if this exists then load the file its 
> related to.
> 
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to