Added the possibility to use trilinear filtering. Trilinear and anisotropic filtering can now be configured (disbaled) in the user config (not yet in the GUI)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4893 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-03-01 22:56:32 +00:00
parent f12641d33b
commit 2efb0ceb10
2 changed files with 19 additions and 2 deletions

View File

@ -241,6 +241,18 @@ namespace UserConfigParams
PARAM_PREFIX IntUserConfigParam m_server_port
PARAM_DEFAULT( IntUserConfigParam(2305, "server_port", "Information about last server used") );
// ---- Graphic Quality
PARAM_PREFIX GroupUserConfigParam m_graphics_quality
PARAM_DEFAULT( GroupUserConfigParam("GFX", "Graphics Quality Settings") );
PARAM_PREFIX BoolUserConfigParam m_anisotropic
PARAM_DEFAULT( BoolUserConfigParam(true, "anisotropic", &m_graphics_quality,
"Whether anisotropic filtering is allowed to be used (true or false)") );
PARAM_PREFIX BoolUserConfigParam m_trilinear
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear", &m_graphics_quality,
"Whether trilinear filtering is allowed to be used (true or false)") );
// ---- Misc
PARAM_PREFIX BoolUserConfigParam m_crashed
PARAM_DEFAULT( BoolUserConfigParam(false, "crashed") ); // TODO : is this used with new code? does it still work?
@ -271,7 +283,7 @@ namespace UserConfigParams
PARAM_PREFIX std::vector<std::string> m_blacklist_res;
PARAM_PREFIX ptr_vector<PlayerProfile> m_all_players;
}
#undef PARAM_PREFIX
#undef PARAM_SUFFIX

View File

@ -21,6 +21,7 @@
#include <stdexcept>
#include "config/user_config.hpp"
#include "config/stk_config.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
@ -161,10 +162,14 @@ void Material::setMaterialProperties(video::SMaterial *m) const
m->SpecularColor = video::SColor(255, 255, 255, 255);
}
if (m_anisotropic)
if (m_anisotropic && UserConfigParams::m_anisotropic)
{
m->setFlag(video::EMF_ANISOTROPIC_FILTER, true);
}
else if (UserConfigParams::m_trilinear)
{
m->setFlag(video::EMF_TRILINEAR_FILTER, true);
}
#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7)