diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 50f097ce7..b43fd2f53 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -452,7 +452,8 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings) mResourceSystem.reset(new Resource::ResourceSystem(mVFS.get())); mResourceSystem->getTextureManager()->setUnRefImageDataAfterApply(true); mResourceSystem->getTextureManager()->setFilterSettings( - Settings::Manager::getString("texture filter", "General"), + Settings::Manager::getString("texture mag filter", "General"), + Settings::Manager::getString("texture min filter", "General"), Settings::Manager::getString("texture mipmap", "General"), Settings::Manager::getInt("anisotropy", "General"), NULL diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index ceea7ce97..b44d77722 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -782,7 +782,8 @@ namespace MWRender void RenderingManager::updateTextureFiltering() { mResourceSystem->getTextureManager()->setFilterSettings( - Settings::Manager::getString("texture filter", "General"), + Settings::Manager::getString("texture mag filter", "General"), + Settings::Manager::getString("texture min filter", "General"), Settings::Manager::getString("texture mipmap", "General"), Settings::Manager::getInt("anisotropy", "General"), mViewer diff --git a/components/resource/texturemanager.cpp b/components/resource/texturemanager.cpp index ea9e7ae5d..d7f3fc61a 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/texturemanager.cpp @@ -66,18 +66,22 @@ namespace Resource mUnRefImageDataAfterApply = unref; } - void TextureManager::setFilterSettings(const std::string &filter, const std::string &mipmap, int maxAnisotropy, osgViewer::Viewer *viewer) + void TextureManager::setFilterSettings(const std::string &magfilter, const std::string &minfilter, + const std::string &mipmap, int maxAnisotropy, + osgViewer::Viewer *viewer) { osg::Texture::FilterMode min = osg::Texture::LINEAR; osg::Texture::FilterMode mag = osg::Texture::LINEAR; - if(filter == "nearest") - { - min = osg::Texture::NEAREST; + if(magfilter == "nearest") mag = osg::Texture::NEAREST; - } - else if(filter != "linear") - std::cerr<< "Invalid texture filter: "<