Just to convince myself that this really does still work, I took an existing app and added the following code to the top of main():

    osgDB::Registry::instance()->addFileExtensionAlias( "foo", "osg" );
    osg::ref_ptr< osg::Node > testload(
            osgDB::readNodeFile( "cow.foo" ) );

Then I renamed cow.osg as cow.foo. Then I set a breakpoint in ReadFile.cpp at line 1683, and indeed the libraryName comes back as "osgdb_osgd.dll".

Turns out the file load fails anyway, as the OSG plugin takes one look at the "foo" extension and returns an error. (This is correct behavior; the .osg plugin doesn't support the "foo" extension.) But the alias does get registered and the appropriate plugin does get invoked.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to