Added (disabled by default) support for anti-aliasing (edit your config file to get it)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7985 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
76541e0265
commit
d113bc4104
@ -347,7 +347,9 @@ namespace UserConfigParams
|
|||||||
PARAM_PREFIX BoolUserConfigParam m_trilinear
|
PARAM_PREFIX BoolUserConfigParam m_trilinear
|
||||||
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear", &m_graphics_quality,
|
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear", &m_graphics_quality,
|
||||||
"Whether trilinear filtering is allowed to be used (true or false)") );
|
"Whether trilinear filtering is allowed to be used (true or false)") );
|
||||||
|
PARAM_PREFIX BoolUserConfigParam m_fullscreen_antialiasing
|
||||||
|
PARAM_DEFAULT( BoolUserConfigParam(false, "fullscreen_antialiasing", &m_graphics_quality,
|
||||||
|
"Whether fullscreen antialiasing is enabled") );
|
||||||
|
|
||||||
// ---- Misc
|
// ---- Misc
|
||||||
PARAM_PREFIX BoolUserConfigParam m_minimal_race_gui
|
PARAM_PREFIX BoolUserConfigParam m_minimal_race_gui
|
||||||
|
@ -150,6 +150,7 @@ void IrrDriver::initDevice()
|
|||||||
for (int bits=32; bits>15; bits -=8)
|
for (int bits=32; bits>15; bits -=8)
|
||||||
{
|
{
|
||||||
std::cout << "[IrrDriver] Trying to create device with " << bits << " bits\n";
|
std::cout << "[IrrDriver] Trying to create device with " << bits << " bits\n";
|
||||||
|
/*
|
||||||
m_device = createDevice(type,
|
m_device = createDevice(type,
|
||||||
core::dimension2d<u32>(UserConfigParams::m_width,
|
core::dimension2d<u32>(UserConfigParams::m_width,
|
||||||
UserConfigParams::m_height ),
|
UserConfigParams::m_height ),
|
||||||
@ -159,6 +160,21 @@ void IrrDriver::initDevice()
|
|||||||
false, // vsync
|
false, // vsync
|
||||||
this // event receiver
|
this // event receiver
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
SIrrlichtCreationParameters params;
|
||||||
|
params.DriverType = type;
|
||||||
|
params.WindowSize = core::dimension2d<u32>(UserConfigParams::m_width,
|
||||||
|
UserConfigParams::m_height);
|
||||||
|
params.Bits = bits;
|
||||||
|
params.EventReceiver = this;
|
||||||
|
params.Fullscreen = UserConfigParams::m_fullscreen;
|
||||||
|
|
||||||
|
if (UserConfigParams::m_fullscreen_antialiasing)
|
||||||
|
params.AntiAlias = 8;
|
||||||
|
|
||||||
|
m_device = createDeviceEx(params);
|
||||||
|
|
||||||
if(m_device) break;
|
if(m_device) break;
|
||||||
} // for bits=32, 24, 16
|
} // for bits=32, 24, 16
|
||||||
if(m_device) break;
|
if(m_device) break;
|
||||||
|
@ -545,6 +545,9 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
|||||||
m->ColorMaterial = video::ECM_NONE; // Override one above
|
m->ColorMaterial = video::ECM_NONE; // Override one above
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (UserConfigParams::m_fullscreen_antialiasing)
|
||||||
|
m->AntiAliasing = video::EAAM_LINE_SMOOTH;
|
||||||
|
|
||||||
|
|
||||||
} // setMaterialProperties
|
} // setMaterialProperties
|
||||||
|
Loading…
Reference in New Issue
Block a user