diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index ad3db305..b9008a5b 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -397,6 +397,10 @@ ModelRegistry::readImage(const string& fileName, isEffect = true; // can_compress = false; } + else if (sgoptC && !transparent && sgoptC->getLoadOriginHint() == SGReaderWriterOptions::LoadOriginHint::ORIGIN_CANVAS) { + SG_LOG(SG_IO, SG_INFO, "From Canvas " + absFileName + " will generate mipmap only"); + can_compress = false; + } if (can_compress) { std::string pot_message; diff --git a/simgear/scene/util/SGReaderWriterOptions.hxx b/simgear/scene/util/SGReaderWriterOptions.hxx index fa0ffc98..dfbe86b7 100644 --- a/simgear/scene/util/SGReaderWriterOptions.hxx +++ b/simgear/scene/util/SGReaderWriterOptions.hxx @@ -46,6 +46,7 @@ public: ORIGIN_EFFECTS, ORIGIN_EFFECTS_NORMALIZED, ORIGIN_SPLASH_SCREEN, + ORIGIN_CANVAS, }; //SGReaderWriterOptions* cloneOptions(const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) const { return static_cast(clone(copyop)); }