Remix all image quality options
This commit is contained in:
parent
1a0034bb9e
commit
02c8c87d5d
@ -147,14 +147,6 @@
|
|||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<label text="Texture compression" I18N="Video settings"/>
|
<label text="Texture compression" I18N="Video settings"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
|
||||||
|
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
|
||||||
<checkbox id="hd-textures"/>
|
|
||||||
<spacer width="10" height="10"/>
|
|
||||||
<label text="Use high definition textures" I18N="Video settings"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="20" width="10" />
|
<spacer height="20" width="10" />
|
||||||
@ -168,9 +160,9 @@
|
|||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
<div layout="horizontal-row" width="100%" proportion="1">
|
||||||
<label text="Texture filtering" I18N="Video settings" width="40%"/>
|
<label text="Rendered image quality" I18N="Video settings" width="40%"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<gauge id="filtering" min_value="0" max_value="5" width="50%" />
|
<gauge id="image_quality" min_value="0" max_value="3" width="50%" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
@ -35,23 +35,24 @@ STKTexManager::STKTexManager() : m_pbo(0), m_thread_size(0),
|
|||||||
#if !(defined(SERVER_ONLY) || defined(USE_GLES2))
|
#if !(defined(SERVER_ONLY) || defined(USE_GLES2))
|
||||||
if (CVS->supportsThreadedTextureLoading())
|
if (CVS->supportsThreadedTextureLoading())
|
||||||
{
|
{
|
||||||
UserConfigParams::m_hq_mipmap = true;
|
|
||||||
pthread_mutex_init(&m_threaded_load_textures_mutex, NULL);
|
pthread_mutex_init(&m_threaded_load_textures_mutex, NULL);
|
||||||
pthread_cond_init(&m_cond_request, NULL);
|
pthread_cond_init(&m_cond_request, NULL);
|
||||||
m_thread_size = HardwareStats::getNumProcessors();
|
m_thread_size = HardwareStats::getNumProcessors();
|
||||||
m_thread_size = core::clamp(m_thread_size, 1, 8);
|
m_thread_size = core::clamp(m_thread_size, 1,
|
||||||
static const unsigned max_pbo_size = 128 * 1024 * 1024;
|
UserConfigParams::m_hq_mipmap ? m_thread_size : 3);
|
||||||
const unsigned each_capacity = max_pbo_size / m_thread_size;
|
const unsigned each_capacity = 16 * 1024 * 1024;
|
||||||
|
const unsigned pbo_size = each_capacity * m_thread_size;
|
||||||
Log::info("STKTexManager", "%d thread(s) for texture loading,"
|
Log::info("STKTexManager", "%d thread(s) for texture loading,"
|
||||||
" each capacity %d MB", m_thread_size,
|
" each capacity 16 MB.", m_thread_size);
|
||||||
each_capacity / 1024 / 1024);
|
if (UserConfigParams::m_hq_mipmap)
|
||||||
|
Log::info("STKTexManager", "High quality mipmap enabled.");
|
||||||
glGenBuffers(1, &m_pbo);
|
glGenBuffers(1, &m_pbo);
|
||||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo);
|
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo);
|
||||||
glBufferStorage(GL_PIXEL_UNPACK_BUFFER, max_pbo_size, NULL,
|
glBufferStorage(GL_PIXEL_UNPACK_BUFFER, pbo_size, NULL,
|
||||||
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT |
|
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT |
|
||||||
GL_MAP_COHERENT_BIT);
|
GL_MAP_COHERENT_BIT);
|
||||||
uint8_t* pbo_ptr = (uint8_t*)glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
|
uint8_t* pbo_ptr = (uint8_t*)glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
|
||||||
0, max_pbo_size, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT |
|
0, pbo_size, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT |
|
||||||
GL_MAP_COHERENT_BIT);
|
GL_MAP_COHERENT_BIT);
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
for (int i = 0; i < m_thread_size; i++)
|
for (int i = 0; i < m_thread_size; i++)
|
||||||
@ -63,7 +64,6 @@ STKTexManager::STKTexManager() : m_pbo(0), m_thread_size(0),
|
|||||||
}
|
}
|
||||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
|
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
} // STKTexManager
|
} // STKTexManager
|
||||||
|
|
||||||
|
@ -61,8 +61,6 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
|||||||
getWidget<CheckBoxWidget>("anim_gfx")->setState(UserConfigParams::m_graphical_effects);
|
getWidget<CheckBoxWidget>("anim_gfx")->setState(UserConfigParams::m_graphical_effects);
|
||||||
getWidget<CheckBoxWidget>("weather_gfx")->setState(UserConfigParams::m_weather_effects);
|
getWidget<CheckBoxWidget>("weather_gfx")->setState(UserConfigParams::m_weather_effects);
|
||||||
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
|
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
|
||||||
getWidget<CheckBoxWidget>("hd-textures")
|
|
||||||
->setState((UserConfigParams::m_high_definition_textures & 0x01)==0x01);
|
|
||||||
|
|
||||||
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
|
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
|
||||||
kart_anim->addLabel(_("Disabled")); // 0
|
kart_anim->addLabel(_("Disabled")); // 0
|
||||||
@ -79,33 +77,24 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
|||||||
//I18N: Geometry level disabled : lowest level, no details
|
//I18N: Geometry level disabled : lowest level, no details
|
||||||
geometry_level->addLabel(_("Disabled"));
|
geometry_level->addLabel(_("Disabled"));
|
||||||
//I18N: Geometry level low : few details are displayed
|
//I18N: Geometry level low : few details are displayed
|
||||||
geometry_level->addLabel(_("low"));
|
geometry_level->addLabel(_("Low"));
|
||||||
//I18N: Geometry level high : everything is displayed
|
//I18N: Geometry level high : everything is displayed
|
||||||
geometry_level->addLabel(_("high"));
|
geometry_level->addLabel(_("High"));
|
||||||
geometry_level->setValue(
|
geometry_level->setValue(
|
||||||
UserConfigParams::m_geometry_level == 2 ? 0 :
|
UserConfigParams::m_geometry_level == 2 ? 0 :
|
||||||
UserConfigParams::m_geometry_level == 0 ? 2 : 1);
|
UserConfigParams::m_geometry_level == 0 ? 2 : 1);
|
||||||
|
|
||||||
SpinnerWidget* filtering = getWidget<SpinnerWidget>("filtering");
|
SpinnerWidget* filtering = getWidget<SpinnerWidget>("image_quality");
|
||||||
int value = 0;
|
filtering->addLabel(_("Very Low"));
|
||||||
if (UserConfigParams::m_anisotropic == 2) value = 2;
|
filtering->addLabel(_("Low"));
|
||||||
else if (UserConfigParams::m_anisotropic == 4) value = 3;
|
filtering->addLabel(_("High"));
|
||||||
else if (UserConfigParams::m_anisotropic == 8) value = 4;
|
filtering->addLabel(_("Very High"));
|
||||||
else if (UserConfigParams::m_anisotropic == 16) value = 5;
|
filtering->setValue(OptionsScreenVideo::getImageQuality());
|
||||||
else if (UserConfigParams::m_trilinear) value = 1;
|
|
||||||
filtering->addLabel(_("Bilinear")); // 0
|
|
||||||
filtering->addLabel(_("Trilinear")); // 1
|
|
||||||
filtering->addLabel(_("Anisotropic x2")); // 2
|
|
||||||
filtering->addLabel(_("Anisotropic x4")); // 3
|
|
||||||
filtering->addLabel(_("Anisotropic x8")); // 4
|
|
||||||
filtering->addLabel(_("Anisotropic x16")); // 5
|
|
||||||
|
|
||||||
filtering->setValue(value);
|
|
||||||
|
|
||||||
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
||||||
shadows->addLabel(_("Disabled")); // 0
|
shadows->addLabel(_("Disabled")); // 0
|
||||||
shadows->addLabel(_("low")); // 1
|
shadows->addLabel(_("Low")); // 1
|
||||||
shadows->addLabel(_("high")); // 2
|
shadows->addLabel(_("High")); // 2
|
||||||
if (CVS->supportsShadows())
|
if (CVS->supportsShadows())
|
||||||
shadows->setValue(UserConfigParams::m_shadows_resolution / 512);
|
shadows->setValue(UserConfigParams::m_shadows_resolution / 512);
|
||||||
else
|
else
|
||||||
@ -195,11 +184,6 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
UserConfigParams::m_weather_effects =
|
UserConfigParams::m_weather_effects =
|
||||||
getWidget<CheckBoxWidget>("weather_gfx")->getState();
|
getWidget<CheckBoxWidget>("weather_gfx")->getState();
|
||||||
|
|
||||||
// Set bit 0 for enabled/disabled, and set bit 1 to indicate that this
|
|
||||||
// is now a user's choice and should not be overwritten by any default
|
|
||||||
UserConfigParams::m_high_definition_textures =
|
|
||||||
getWidget<CheckBoxWidget>("hd-textures")->getState() ? 0x03 : 0x02;
|
|
||||||
|
|
||||||
UserConfigParams::m_show_steering_animations =
|
UserConfigParams::m_show_steering_animations =
|
||||||
getWidget<SpinnerWidget>("steering_animations")->getValue();
|
getWidget<SpinnerWidget>("steering_animations")->getValue();
|
||||||
|
|
||||||
@ -207,33 +191,8 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
||||||
UserConfigParams::m_geometry_level = val == 2 ? 0 : val == 0 ? 2 : 1;
|
UserConfigParams::m_geometry_level = val == 2 ? 0 : val == 0 ? 2 : 1;
|
||||||
|
|
||||||
switch (getWidget<SpinnerWidget>("filtering")->getValue())
|
OptionsScreenVideo::setImageQuality(getWidget<SpinnerWidget>
|
||||||
{
|
("image_quality")->getValue());
|
||||||
case 0:
|
|
||||||
UserConfigParams::m_anisotropic = 0;
|
|
||||||
UserConfigParams::m_trilinear = false;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
UserConfigParams::m_anisotropic = 0;
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
UserConfigParams::m_anisotropic = 2;
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
UserConfigParams::m_anisotropic = 4;
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
UserConfigParams::m_anisotropic = 8;
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
UserConfigParams::m_anisotropic = 16;
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
user_config->saveConfig();
|
user_config->saveConfig();
|
||||||
|
|
||||||
|
@ -53,32 +53,32 @@ void OptionsScreenVideo::initPresets()
|
|||||||
({
|
({
|
||||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||||
false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */,
|
false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */, 0 /* hd_textures */
|
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
true /* animatedScenery */, 1 /* animatedCharacters */, 1 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */, 0 /* hd_textures */
|
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
|
||||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
true /* animatedScenery */, 1 /* animatedCharacters */, 2 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */, 1 /* hd_textures */
|
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
||||||
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
|
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
|
||||||
true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */,
|
true /* animatedScenery */, 1 /* animatedCharacters */, 2 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, false /* degraded IBL */, 1 /* hd_textures */
|
false /* depth of field */, false /* global illumination */, false /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
@ -91,8 +91,8 @@ void OptionsScreenVideo::initPresets()
|
|||||||
#else
|
#else
|
||||||
2 /* animatedCharacters */,
|
2 /* animatedCharacters */,
|
||||||
#endif
|
#endif
|
||||||
16 /* anisotropy */,
|
3 /* image_quality */,
|
||||||
true /* depth of field */, false /* global illumination */, false /* degraded IBL */, 1 /* hd_textures */
|
true /* depth of field */, false /* global illumination */, false /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
@ -105,8 +105,8 @@ void OptionsScreenVideo::initPresets()
|
|||||||
#else
|
#else
|
||||||
2 /* animatedCharacters */,
|
2 /* animatedCharacters */,
|
||||||
#endif
|
#endif
|
||||||
16 /* anisotropy */,
|
3 /* image_quality */,
|
||||||
true /* depth of field */, true /* global illumination */, false /* degraded IBL */, 1 /* hd_textures */
|
true /* depth of field */, true /* global illumination */, false /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
} // initPresets
|
} // initPresets
|
||||||
@ -139,6 +139,74 @@ struct Resolution
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
int OptionsScreenVideo::getImageQuality()
|
||||||
|
{
|
||||||
|
if (UserConfigParams::m_scale_rtts_factor == 0.8f &&
|
||||||
|
UserConfigParams::m_trilinear == false &&
|
||||||
|
UserConfigParams::m_anisotropic == 0 &&
|
||||||
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
|
||||||
|
UserConfigParams::m_hq_mipmap == false)
|
||||||
|
return 0;
|
||||||
|
if (UserConfigParams::m_scale_rtts_factor == 1.0f &&
|
||||||
|
UserConfigParams::m_trilinear == true &&
|
||||||
|
UserConfigParams::m_anisotropic == 2 &&
|
||||||
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
|
||||||
|
UserConfigParams::m_hq_mipmap == false)
|
||||||
|
return 1;
|
||||||
|
if (UserConfigParams::m_scale_rtts_factor == 1.0f &&
|
||||||
|
UserConfigParams::m_trilinear == true &&
|
||||||
|
UserConfigParams::m_anisotropic == 4 &&
|
||||||
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
||||||
|
UserConfigParams::m_hq_mipmap == false)
|
||||||
|
return 2;
|
||||||
|
if (UserConfigParams::m_scale_rtts_factor == 1.0f &&
|
||||||
|
UserConfigParams::m_trilinear == true &&
|
||||||
|
UserConfigParams::m_anisotropic == 16 &&
|
||||||
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
||||||
|
UserConfigParams::m_hq_mipmap == true)
|
||||||
|
return 3;
|
||||||
|
return 2;
|
||||||
|
} // getImageQuality
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
void OptionsScreenVideo::setImageQuality(int quality)
|
||||||
|
{
|
||||||
|
switch (quality)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
UserConfigParams::m_scale_rtts_factor = 0.8f;
|
||||||
|
UserConfigParams::m_trilinear = false;
|
||||||
|
UserConfigParams::m_anisotropic = 0;
|
||||||
|
UserConfigParams::m_high_definition_textures = 0x02;
|
||||||
|
UserConfigParams::m_hq_mipmap = false;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
UserConfigParams::m_scale_rtts_factor = 1.0f;
|
||||||
|
UserConfigParams::m_trilinear = true;
|
||||||
|
UserConfigParams::m_anisotropic = 2;
|
||||||
|
UserConfigParams::m_high_definition_textures = 0x02;
|
||||||
|
UserConfigParams::m_hq_mipmap = false;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
UserConfigParams::m_scale_rtts_factor = 1.0f;
|
||||||
|
UserConfigParams::m_trilinear = true;
|
||||||
|
UserConfigParams::m_anisotropic = 4;
|
||||||
|
UserConfigParams::m_high_definition_textures = 0x03;
|
||||||
|
UserConfigParams::m_hq_mipmap = false;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
UserConfigParams::m_scale_rtts_factor = 1.0f;
|
||||||
|
UserConfigParams::m_trilinear = true;
|
||||||
|
UserConfigParams::m_anisotropic = 16;
|
||||||
|
UserConfigParams::m_high_definition_textures = 0x03;
|
||||||
|
UserConfigParams::m_hq_mipmap = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
|
} // setImageQuality
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
OptionsScreenVideo::OptionsScreenVideo() : Screen("options_video.stkgui"),
|
OptionsScreenVideo::OptionsScreenVideo() : Screen("options_video.stkgui"),
|
||||||
@ -341,7 +409,7 @@ void OptionsScreenVideo::updateGfxSlider()
|
|||||||
{
|
{
|
||||||
if (m_presets[l].animatedCharacters == UserConfigParams::m_show_steering_animations &&
|
if (m_presets[l].animatedCharacters == UserConfigParams::m_show_steering_animations &&
|
||||||
m_presets[l].animatedScenery == UserConfigParams::m_graphical_effects &&
|
m_presets[l].animatedScenery == UserConfigParams::m_graphical_effects &&
|
||||||
m_presets[l].anisotropy == UserConfigParams::m_anisotropic &&
|
m_presets[l].image_quality == getImageQuality() &&
|
||||||
m_presets[l].bloom == UserConfigParams::m_bloom &&
|
m_presets[l].bloom == UserConfigParams::m_bloom &&
|
||||||
m_presets[l].glow == UserConfigParams::m_glow &&
|
m_presets[l].glow == UserConfigParams::m_glow &&
|
||||||
m_presets[l].lights == UserConfigParams::m_dynamic_lights &&
|
m_presets[l].lights == UserConfigParams::m_dynamic_lights &&
|
||||||
@ -354,8 +422,7 @@ void OptionsScreenVideo::updateGfxSlider()
|
|||||||
m_presets[l].weather == UserConfigParams::m_weather_effects &&
|
m_presets[l].weather == UserConfigParams::m_weather_effects &&
|
||||||
m_presets[l].dof == UserConfigParams::m_dof &&
|
m_presets[l].dof == UserConfigParams::m_dof &&
|
||||||
m_presets[l].global_illumination == UserConfigParams::m_gi &&
|
m_presets[l].global_illumination == UserConfigParams::m_gi &&
|
||||||
m_presets[l].degraded_ibl == UserConfigParams::m_degraded_IBL &&
|
m_presets[l].degraded_ibl == UserConfigParams::m_degraded_IBL)
|
||||||
m_presets[l].hd_textures == (UserConfigParams::m_high_definition_textures & 0x01))
|
|
||||||
{
|
{
|
||||||
gfx->setValue(l + 1);
|
gfx->setValue(l + 1);
|
||||||
found = true;
|
found = true;
|
||||||
@ -395,6 +462,19 @@ void OptionsScreenVideo::updateTooltip()
|
|||||||
//I18N: if no kart animations are enabled
|
//I18N: if no kart animations are enabled
|
||||||
const core::stringw none = _LTR("None");
|
const core::stringw none = _LTR("None");
|
||||||
|
|
||||||
|
//I18N: in the graphical options tooltip;
|
||||||
|
// indicates the rendered image quality is very low
|
||||||
|
const core::stringw very_low = _LTR("Very Low");
|
||||||
|
//I18N: in the graphical options tooltip;
|
||||||
|
// indicates the rendered image quality is low
|
||||||
|
const core::stringw low = _LTR("Low");
|
||||||
|
//I18N: in the graphical options tooltip;
|
||||||
|
// indicates the rendered image quality is high
|
||||||
|
const core::stringw high = _LTR("High");
|
||||||
|
//I18N: in the graphical options tooltip;
|
||||||
|
// indicates the rendered image quality is very high
|
||||||
|
const core::stringw very_high = _LTR("Very High");
|
||||||
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
// tooltip = tooltip + L"\n" + _("Pixel shaders: %s",
|
// tooltip = tooltip + L"\n" + _("Pixel shaders: %s",
|
||||||
// UserConfigParams::m_pixel_shaders ? enabled : disabled);
|
// UserConfigParams::m_pixel_shaders ? enabled : disabled);
|
||||||
@ -448,8 +528,10 @@ void OptionsScreenVideo::updateTooltip()
|
|||||||
UserConfigParams::m_gi ? enabled : disabled);
|
UserConfigParams::m_gi ? enabled : disabled);
|
||||||
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
tooltip = tooltip + L"\n" + _("Use high definition textures: %s",
|
int quality = getImageQuality();
|
||||||
(UserConfigParams::m_high_definition_textures & 0x1) == 0 ? disabled : enabled);
|
tooltip = tooltip + L"\n" + _("Rendered image quality: %s",
|
||||||
|
quality == 0 ? very_low : quality == 1 ? low : quality == 2 ?
|
||||||
|
high : very_high);
|
||||||
|
|
||||||
gfx->setTooltip(tooltip);
|
gfx->setTooltip(tooltip);
|
||||||
} // updateTooltip
|
} // updateTooltip
|
||||||
@ -518,7 +600,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
|||||||
|
|
||||||
UserConfigParams::m_show_steering_animations = m_presets[level].animatedCharacters;
|
UserConfigParams::m_show_steering_animations = m_presets[level].animatedCharacters;
|
||||||
UserConfigParams::m_graphical_effects = m_presets[level].animatedScenery;
|
UserConfigParams::m_graphical_effects = m_presets[level].animatedScenery;
|
||||||
UserConfigParams::m_anisotropic = m_presets[level].anisotropy;
|
setImageQuality(m_presets[level].image_quality);
|
||||||
UserConfigParams::m_bloom = m_presets[level].bloom;
|
UserConfigParams::m_bloom = m_presets[level].bloom;
|
||||||
UserConfigParams::m_glow = m_presets[level].glow;
|
UserConfigParams::m_glow = m_presets[level].glow;
|
||||||
UserConfigParams::m_dynamic_lights = m_presets[level].lights;
|
UserConfigParams::m_dynamic_lights = m_presets[level].lights;
|
||||||
@ -532,7 +614,6 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
|||||||
UserConfigParams::m_dof = m_presets[level].dof;
|
UserConfigParams::m_dof = m_presets[level].dof;
|
||||||
UserConfigParams::m_gi = m_presets[level].global_illumination;
|
UserConfigParams::m_gi = m_presets[level].global_illumination;
|
||||||
UserConfigParams::m_degraded_IBL = m_presets[level].degraded_ibl;
|
UserConfigParams::m_degraded_IBL = m_presets[level].degraded_ibl;
|
||||||
UserConfigParams::m_high_definition_textures = 0x02 | m_presets[level].hd_textures;
|
|
||||||
|
|
||||||
updateGfxSlider();
|
updateGfxSlider();
|
||||||
}
|
}
|
||||||
|
@ -38,12 +38,11 @@ struct GFXPreset
|
|||||||
bool weather;
|
bool weather;
|
||||||
bool animatedScenery;
|
bool animatedScenery;
|
||||||
int animatedCharacters;
|
int animatedCharacters;
|
||||||
int anisotropy;
|
int image_quality;
|
||||||
/** Depth of field */
|
/** Depth of field */
|
||||||
bool dof;
|
bool dof;
|
||||||
bool global_illumination;
|
bool global_illumination;
|
||||||
bool degraded_ibl;
|
bool degraded_ibl;
|
||||||
int hd_textures;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,6 +80,8 @@ public:
|
|||||||
virtual void unloaded() OVERRIDE;
|
virtual void unloaded() OVERRIDE;
|
||||||
|
|
||||||
void updateGfxSlider();
|
void updateGfxSlider();
|
||||||
|
static int getImageQuality();
|
||||||
|
static void setImageQuality(int quality);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user