From 4c85f6255b729d7dfd88013e3aa7afab73b0ef99 Mon Sep 17 00:00:00 2001 From: vlj Date: Mon, 14 Apr 2014 22:11:20 +0200 Subject: [PATCH] Remove the ability to disable pixel shaders It doesn't work with GL 3.1 and mesa drivers (which requires a core context) --- src/config/user_config.hpp | 4 ---- src/graphics/irr_driver.cpp | 2 +- src/states_screens/dialogs/custom_video_settings.cpp | 6 +++--- src/states_screens/options_screen_video.cpp | 9 +++++---- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index 852e86d4b..f5025eb8c 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -604,10 +604,6 @@ namespace UserConfigParams PARAM_DEFAULT( BoolUserConfigParam(false, "vsync", &m_graphics_quality, "Whether vertical sync is enabled") ); - PARAM_PREFIX BoolUserConfigParam m_pixel_shaders - PARAM_DEFAULT( BoolUserConfigParam(false, "pixel_shaders", - &m_graphics_quality, - "Whether to enable pixel shaders (splatting, normal maps, ...)") ); PARAM_PREFIX BoolUserConfigParam m_motionblur PARAM_DEFAULT( BoolUserConfigParam(false, "motionblur_enabled", &m_graphics_quality, diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 59886ae2f..e78ca2fea 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -427,7 +427,7 @@ void IrrDriver::initDevice() glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion); glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion); Log::info("IrrDriver", "OPENGL VERSION IS %d.%d", GLMajorVersion, GLMinorVersion); - m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1)) && UserConfigParams::m_pixel_shaders; + m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1)); // This remaps the window, so it has to be done before the clear to avoid flicker m_device->setResizable(false); diff --git a/src/states_screens/dialogs/custom_video_settings.cpp b/src/states_screens/dialogs/custom_video_settings.cpp index 36b66ab01..e9be6963a 100644 --- a/src/states_screens/dialogs/custom_video_settings.cpp +++ b/src/states_screens/dialogs/custom_video_settings.cpp @@ -99,7 +99,7 @@ void CustomVideoSettingsialog::beforeAddingWidgets() getWidget("motionblur")->setState( UserConfigParams::m_motionblur ); getWidget("mlaa")->setState( UserConfigParams::m_mlaa ); - getWidget("pixelshaders")->setState(UserConfigParams::m_pixel_shaders); +// getWidget("pixelshaders")->setState(UserConfigParams::m_pixel_shaders); } // ----------------------------------------------------------------------------- @@ -118,8 +118,8 @@ GUIEngine::EventPropagation CustomVideoSettingsialog::processEvent(const std::st getWidget("motionblur")->getState(); UserConfigParams::m_show_steering_animations = getWidget("steering_animations")->getValue(); - UserConfigParams::m_pixel_shaders = - getWidget("pixelshaders")->getState(); +// UserConfigParams::m_pixel_shaders = +// getWidget("pixelshaders")->getState(); UserConfigParams::m_mlaa = getWidget("mlaa")->getState(); UserConfigParams::m_ssao = diff --git a/src/states_screens/options_screen_video.cpp b/src/states_screens/options_screen_video.cpp index 9b553e02d..afb747a34 100644 --- a/src/states_screens/options_screen_video.cpp +++ b/src/states_screens/options_screen_video.cpp @@ -318,7 +318,8 @@ void OptionsScreenVideo::updateGfxSlider() UserConfigParams::m_mlaa == GFX_MLAA[l] && UserConfigParams::m_ssao == GFX_SSAO[l] && UserConfigParams::m_shadows == GFX_SHADOWS[l] && - UserConfigParams::m_pixel_shaders == GFX_PIXEL_SHADERS[l]) +// UserConfigParams::m_pixel_shaders == GFX_PIXEL_SHADERS[l]) + true) { gfx->setValue(l+1); found = true; @@ -374,8 +375,8 @@ void OptionsScreenVideo::updateTooltip() */ //I18N: in graphical options - tooltip = tooltip + L"\n" + _("Pixel shaders : %s", - UserConfigParams::m_pixel_shaders ? enabled : disabled); +// tooltip = tooltip + L"\n" + _("Pixel shaders : %s", +// UserConfigParams::m_pixel_shaders ? enabled : disabled); //I18N: in graphical options tooltip = _("Animated Scenery : %s", UserConfigParams::m_graphical_effects ? enabled : disabled); @@ -480,7 +481,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name, UserConfigParams::m_weather_effects = GFX_WEATHER[level-1]; //UserConfigParams::m_antialiasing = GFX_ANTIALIAS[level-1]; UserConfigParams::m_motionblur = GFX_MOTIONBLUR[level-1]; - UserConfigParams::m_pixel_shaders = GFX_PIXEL_SHADERS[level-1]; +// UserConfigParams::m_pixel_shaders = GFX_PIXEL_SHADERS[level-1]; UserConfigParams::m_mlaa = GFX_MLAA[level-1]; UserConfigParams::m_ssao = GFX_SSAO[level-1]; UserConfigParams::m_shadows = GFX_SHADOWS[level-1];