mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 07:36:41 +00:00
Rename the texture filter options
To avoid compatibility issues with upgrading from or downgrading to older builds.
This commit is contained in:
parent
646092ce3a
commit
b830a413d3
4 changed files with 15 additions and 15 deletions
|
@ -455,16 +455,16 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
osg::Texture::FilterMode min = osg::Texture::LINEAR;
|
osg::Texture::FilterMode min = osg::Texture::LINEAR;
|
||||||
osg::Texture::FilterMode mag = 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")
|
if(filter == "nearest")
|
||||||
{
|
{
|
||||||
min = osg::Texture::NEAREST;
|
min = osg::Texture::NEAREST;
|
||||||
mag = osg::Texture::NEAREST;
|
mag = osg::Texture::NEAREST;
|
||||||
}
|
}
|
||||||
else if(filter != "linear")
|
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(mipmap == "nearest")
|
||||||
{
|
{
|
||||||
if(min == osg::Texture::NEAREST)
|
if(min == osg::Texture::NEAREST)
|
||||||
|
@ -475,7 +475,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
else if(mipmap != "none")
|
else if(mipmap != "none")
|
||||||
{
|
{
|
||||||
if(mipmap != "linear")
|
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)
|
if(min == osg::Texture::NEAREST)
|
||||||
min = osg::Texture::NEAREST_MIPMAP_LINEAR;
|
min = osg::Texture::NEAREST_MIPMAP_LINEAR;
|
||||||
else if(min == osg::Texture::LINEAR)
|
else if(min == osg::Texture::LINEAR)
|
||||||
|
|
|
@ -236,7 +236,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
highlightCurrentResolution();
|
highlightCurrentResolution();
|
||||||
|
|
||||||
std::string tmip = Settings::Manager::getString("texture mipmapping", "General");
|
std::string tmip = Settings::Manager::getString("texture mipmap", "General");
|
||||||
mTextureFilteringButton->setCaption(textureMipmappingToStr(tmip));
|
mTextureFilteringButton->setCaption(textureMipmappingToStr(tmip));
|
||||||
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(Settings::Manager::getInt("anisotropy", "General")) + ")");
|
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)
|
void SettingsWindow::onTextureFilteringChanged(MyGUI::ComboBox* _sender, size_t pos)
|
||||||
{
|
{
|
||||||
if(pos == 0)
|
if(pos == 0)
|
||||||
Settings::Manager::setString("texture mipmapping", "General", "nearest");
|
Settings::Manager::setString("texture mipmap", "General", "nearest");
|
||||||
else if(pos == 1)
|
else if(pos == 1)
|
||||||
Settings::Manager::setString("texture mipmapping", "General", "linear");
|
Settings::Manager::setString("texture mipmap", "General", "linear");
|
||||||
else
|
else
|
||||||
std::cerr<< "Unexpected option pos "<<pos <<std::endl;
|
std::cerr<< "Unexpected option pos "<<pos <<std::endl;
|
||||||
apply();
|
apply();
|
||||||
|
|
|
@ -784,14 +784,14 @@ namespace MWRender
|
||||||
osg::Texture::FilterMode min = osg::Texture::LINEAR;
|
osg::Texture::FilterMode min = osg::Texture::LINEAR;
|
||||||
osg::Texture::FilterMode mag = 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")
|
if(filter == "nearest")
|
||||||
{
|
{
|
||||||
min = osg::Texture::NEAREST;
|
min = osg::Texture::NEAREST;
|
||||||
mag = 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(mipmap == "nearest")
|
||||||
{
|
{
|
||||||
if(min == osg::Texture::NEAREST)
|
if(min == osg::Texture::NEAREST)
|
||||||
|
@ -846,8 +846,8 @@ namespace MWRender
|
||||||
mStateUpdater->setFogEnd(mViewDistance);
|
mStateUpdater->setFogEnd(mViewDistance);
|
||||||
updateProjectionMatrix();
|
updateProjectionMatrix();
|
||||||
}
|
}
|
||||||
else if (it->first == "General" && (it->second == "texture filtering" ||
|
else if (it->first == "General" && (it->second == "texture filter" ||
|
||||||
it->second == "texture mipmapping" ||
|
it->second == "texture mipmap" ||
|
||||||
it->second == "anisotropy"))
|
it->second == "anisotropy"))
|
||||||
updateTextureFiltering();
|
updateTextureFiltering();
|
||||||
else if (it->first == "Water")
|
else if (it->first == "Water")
|
||||||
|
|
|
@ -110,11 +110,11 @@ anisotropy = 4
|
||||||
# File format for screenshots. (jpg, png, tga, and possibly more).
|
# File format for screenshots. (jpg, png, tga, and possibly more).
|
||||||
screenshot format = png
|
screenshot format = png
|
||||||
|
|
||||||
# Texture filtering. (nearest or linear).
|
# Texture filter type. (nearest or linear).
|
||||||
texture filtering = linear
|
texture filter = linear
|
||||||
|
|
||||||
# Texture mipmapping. (none, nearest, or linear).
|
# Texture mipmap type. (none, nearest, or linear).
|
||||||
texture mipmapping = nearest
|
texture mipmap = nearest
|
||||||
|
|
||||||
[Input]
|
[Input]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue