mirror of
https://github.com/minetest/minetest.git
synced 2025-01-11 07:47:31 +01:00
Disable dynamic shadow dropdown on OGLES2 (#12637)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
b91063daef
commit
eb49b6d85c
@ -220,11 +220,19 @@ local function formspec(tabview, name, tabdata)
|
||||
"checkbox[8.25,1.5;cb_waving_leaves;" .. fgettext("Waving Leaves") .. ";"
|
||||
.. dump(core.settings:get_bool("enable_waving_leaves")) .. "]" ..
|
||||
"checkbox[8.25,2;cb_waving_plants;" .. fgettext("Waving Plants") .. ";"
|
||||
.. dump(core.settings:get_bool("enable_waving_plants")) .. "]"..
|
||||
.. dump(core.settings:get_bool("enable_waving_plants")) .. "]"
|
||||
|
||||
if video_driver == "opengl" then
|
||||
tab_string = tab_string ..
|
||||
"label[8.25,2.8;" .. fgettext("Dynamic shadows:") .. "]" ..
|
||||
"label[8.25,3.2;" .. fgettext("(game support required)") .. "]" ..
|
||||
"dropdown[8.25,3.7;3.5;dd_shadows;" .. dd_options.shadow_levels[1] .. ";"
|
||||
.. getSettingIndex.ShadowMapping() .. "]"
|
||||
else
|
||||
tab_string = tab_string ..
|
||||
"label[8.38,2.7;" .. core.colorize("#888888",
|
||||
fgettext("Dynamic shadows")) .. "]"
|
||||
end
|
||||
else
|
||||
tab_string = tab_string ..
|
||||
"label[8.38,0.7;" .. core.colorize("#888888",
|
||||
|
@ -35,6 +35,13 @@ RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud
|
||||
screensize = driver->getScreenSize();
|
||||
virtual_size = screensize;
|
||||
|
||||
// disable if unsupported
|
||||
if (g_settings->getBool("enable_dynamic_shadows") && (
|
||||
g_settings->get("video_driver") != "opengl" ||
|
||||
!g_settings->getBool("enable_shaders"))) {
|
||||
g_settings->setBool("enable_dynamic_shadows", false);
|
||||
}
|
||||
|
||||
if (g_settings->getBool("enable_shaders") &&
|
||||
g_settings->getBool("enable_dynamic_shadows")) {
|
||||
shadow_renderer = new ShadowRenderer(device, client);
|
||||
|
Loading…
Reference in New Issue
Block a user