diff options
author | Vitaliy <numzer0@yandex.ru> | 2020-10-25 20:01:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-25 18:01:03 +0100 |
commit | 707c8c1e95d8db2d84909e7957b4dc9138e05599 (patch) | |
tree | 84604fc1868c7b8ca8e977d5dd0485498500cdfe /builtin/mainmenu | |
parent | 33b2c5f5b1c565171296f26395d803b08f4575e9 (diff) | |
download | minetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.tar.gz minetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.tar.bz2 minetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.zip |
Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r-- | builtin/mainmenu/tab_settings.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index 8a7445394..29744048a 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -154,15 +154,18 @@ local function formspec(tabview, name, tabdata) "box[8,0;3.75,4.5;#999999]" local video_driver = core.settings:get("video_driver") - local shaders_supported = video_driver == "opengl" - local shaders_enabled = false - if shaders_supported then - shaders_enabled = core.settings:get_bool("enable_shaders") + local shaders_enabled = core.settings:get_bool("enable_shaders") + if video_driver == "opengl" then tab_string = tab_string .. "checkbox[8.25,0;cb_shaders;" .. fgettext("Shaders") .. ";" .. tostring(shaders_enabled) .. "]" + elseif video_driver == "ogles2" then + tab_string = tab_string .. + "checkbox[8.25,0;cb_shaders;" .. fgettext("Shaders (experimental)") .. ";" + .. tostring(shaders_enabled) .. "]" else core.settings:set_bool("enable_shaders", false) + shaders_enabled = false tab_string = tab_string .. "label[8.38,0.2;" .. core.colorize("#888888", fgettext("Shaders (unavailable)")) .. "]" |