Rename the texture filter options

To avoid compatibility issues with upgrading from or downgrading to older
builds.
openmw-38
Chris Robinson 9 years ago
parent 646092ce3a
commit b830a413d3

@ -455,16 +455,16 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
osg::Texture::FilterMode min = osg::Texture::LINEAR;
osg::Texture::FilterMode mag = osg::Texture::LINEAR;
std::string filter = Settings::Manager::getString("texture filtering", "General");
std::string filter = Settings::Manager::getString("texture filter", "General");
if(filter == "nearest")
{
min = osg::Texture::NEAREST;
mag = osg::Texture::NEAREST;
}
else if(filter != "linear")
std::cerr<< "Invalid texture filtering option: "<<filter <<std::endl;
std::cerr<< "Invalid texture filter option: "<<filter <<std::endl;
std::string mipmap = Settings::Manager::getString("texture mipmapping", "General");
std::string mipmap = Settings::Manager::getString("texture mipmap", "General");
if(mipmap == "nearest")
{
if(min == osg::Texture::NEAREST)
@ -475,7 +475,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
else if(mipmap != "none")
{
if(mipmap != "linear")
std::cerr<< "Invalid texture mipmapping option: "<<mipmap <<std::endl;
std::cerr<< "Invalid texture mipmap option: "<<mipmap <<std::endl;
if(min == osg::Texture::NEAREST)
min = osg::Texture::NEAREST_MIPMAP_LINEAR;
else if(min == osg::Texture::LINEAR)

@ -236,7 +236,7 @@ namespace MWGui
}
highlightCurrentResolution();
std::string tmip = Settings::Manager::getString("texture mipmapping", "General");
std::string tmip = Settings::Manager::getString("texture mipmap", "General");
mTextureFilteringButton->setCaption(textureMipmappingToStr(tmip));
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(Settings::Manager::getInt("anisotropy", "General")) + ")");
@ -427,9 +427,9 @@ namespace MWGui
void SettingsWindow::onTextureFilteringChanged(MyGUI::ComboBox* _sender, size_t pos)
{
if(pos == 0)
Settings::Manager::setString("texture mipmapping", "General", "nearest");
Settings::Manager::setString("texture mipmap", "General", "nearest");
else if(pos == 1)
Settings::Manager::setString("texture mipmapping", "General", "linear");
Settings::Manager::setString("texture mipmap", "General", "linear");
else
std::cerr<< "Unexpected option pos "<<pos <<std::endl;
apply();

@ -784,14 +784,14 @@ namespace MWRender
osg::Texture::FilterMode min = osg::Texture::LINEAR;
osg::Texture::FilterMode mag = osg::Texture::LINEAR;
std::string filter = Settings::Manager::getString("texture filtering", "General");
std::string filter = Settings::Manager::getString("texture filter", "General");
if(filter == "nearest")
{
min = osg::Texture::NEAREST;
mag = osg::Texture::NEAREST;
}
std::string mipmap = Settings::Manager::getString("texture mipmapping", "General");
std::string mipmap = Settings::Manager::getString("texture mipmap", "General");
if(mipmap == "nearest")
{
if(min == osg::Texture::NEAREST)
@ -846,8 +846,8 @@ namespace MWRender
mStateUpdater->setFogEnd(mViewDistance);
updateProjectionMatrix();
}
else if (it->first == "General" && (it->second == "texture filtering" ||
it->second == "texture mipmapping" ||
else if (it->first == "General" && (it->second == "texture filter" ||
it->second == "texture mipmap" ||
it->second == "anisotropy"))
updateTextureFiltering();
else if (it->first == "Water")

@ -110,11 +110,11 @@ anisotropy = 4
# File format for screenshots. (jpg, png, tga, and possibly more).
screenshot format = png
# Texture filtering. (nearest or linear).
texture filtering = linear
# Texture filter type. (nearest or linear).
texture filter = linear
# Texture mipmapping. (none, nearest, or linear).
texture mipmapping = nearest
# Texture mipmap type. (none, nearest, or linear).
texture mipmap = nearest
[Input]

Loading…
Cancel
Save