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 | |
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')
-rw-r--r-- | builtin/mainmenu/tab_settings.lua | 11 | ||||
-rw-r--r-- | builtin/settingtypes.txt | 4 |
2 files changed, 9 insertions, 6 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)")) .. "]" diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 27f375693..36446f808 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -658,8 +658,8 @@ texture_path (Texture path) path # The rendering back-end for Irrlicht. # A restart is required after changing this. # Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise. -# On other platforms, OpenGL is recommended, and it’s the only driver with -# shader support currently. +# On other platforms, OpenGL is recommended. +# Shaders are supported by OpenGL (desktop only) and OGLES2 (experimental) video_driver (Video driver) enum opengl null,software,burningsvideo,direct3d8,direct3d9,opengl,ogles1,ogles2 # Radius of cloud area stated in number of 64 node cloud squares. |