From: frohlich Date: Mon, 20 Nov 2006 18:19:02 +0000 (+0000) Subject: Modified Files: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=18d5a492c8d5ab3c64aff7daa558b9089ec2caa1;p=simgear.git Modified Files: model.cxx: Tweak model optimizations --- diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index acc8a1f8..8be60e92 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -212,7 +212,10 @@ public: SG_LOG(SG_IO, SG_INFO, "Reading model \"" << absFileName << "\""); + bool needTristrip = true; if (osgDB::getLowerCaseFileExtension(absFileName) == "ac") { + // we get optimal geometry from the loader. + needTristrip = false; osg::Matrix m(1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, @@ -250,7 +253,7 @@ public: unsigned opts = 0; // Don't use this one. It will break animation names ... // opts |= osgUtil::Optimizer::REMOVE_REDUNDANT_NODES; - + // opts |= osgUtil::Optimizer::REMOVE_LOADED_PROXY_NODES; // opts |= osgUtil::Optimizer::COMBINE_ADJACENT_LODS; // opts |= osgUtil::Optimizer::SHARE_DUPLICATE_STATE; @@ -258,9 +261,10 @@ public: // opts |= osgUtil::Optimizer::CHECK_GEOMETRY; // opts |= osgUtil::Optimizer::SPATIALIZE_GROUPS; // opts |= osgUtil::Optimizer::COPY_SHARED_NODES; - opts |= osgUtil::Optimizer::TRISTRIP_GEOMETRY; + if (needTristrip) + opts |= osgUtil::Optimizer::TRISTRIP_GEOMETRY; // opts |= osgUtil::Optimizer::TESSELATE_GEOMETRY; - // opts |= osgUtil::Optimizer::OPTIMIZE_TEXTURE_SETTINGS; + opts |= osgUtil::Optimizer::OPTIMIZE_TEXTURE_SETTINGS; optimizer.optimize(res.getNode(), opts); // OSGFIXME