+ osgDB::Registry* registry = osgDB::Registry::instance();
+ osgDB::ReaderWriter::ReadResult res;
+ // The BTG loader automatically looks for ".btg.gz" if a file with
+ // the .btg extension doesn't exist. Also, we don't want to add
+ // nodes, run the optimizer, etc. on the btg model.So, let it do
+ // its thing.
+ if (osgDB::equalCaseInsensitive(osgDB::getFileExtension(fileName), "btg")) {
+ return registry->readNodeImplementation(fileName, opt);
+ }