Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android) Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
c400b9d9e8
commit
88f2e825b9
|
@ -154,15 +154,18 @@ local function formspec(tabview, name, tabdata)
|
||||||
"box[8,0;3.75,4.5;#999999]"
|
"box[8,0;3.75,4.5;#999999]"
|
||||||
|
|
||||||
local video_driver = core.settings:get("video_driver")
|
local video_driver = core.settings:get("video_driver")
|
||||||
local shaders_supported = video_driver == "opengl"
|
local shaders_enabled = core.settings:get_bool("enable_shaders")
|
||||||
local shaders_enabled = false
|
if video_driver == "opengl" then
|
||||||
if shaders_supported then
|
|
||||||
shaders_enabled = core.settings:get_bool("enable_shaders")
|
|
||||||
tab_string = tab_string ..
|
tab_string = tab_string ..
|
||||||
"checkbox[8.25,0;cb_shaders;" .. fgettext("Shaders") .. ";"
|
"checkbox[8.25,0;cb_shaders;" .. fgettext("Shaders") .. ";"
|
||||||
.. tostring(shaders_enabled) .. "]"
|
.. 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
|
else
|
||||||
core.settings:set_bool("enable_shaders", false)
|
core.settings:set_bool("enable_shaders", false)
|
||||||
|
shaders_enabled = false
|
||||||
tab_string = tab_string ..
|
tab_string = tab_string ..
|
||||||
"label[8.38,0.2;" .. core.colorize("#888888",
|
"label[8.38,0.2;" .. core.colorize("#888888",
|
||||||
fgettext("Shaders (unavailable)")) .. "]"
|
fgettext("Shaders (unavailable)")) .. "]"
|
||||||
|
|
|
@ -658,8 +658,8 @@ texture_path (Texture path) path
|
||||||
# The rendering back-end for Irrlicht.
|
# The rendering back-end for Irrlicht.
|
||||||
# A restart is required after changing this.
|
# A restart is required after changing this.
|
||||||
# Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise.
|
# 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
|
# On other platforms, OpenGL is recommended.
|
||||||
# shader support currently.
|
# Shaders are supported by OpenGL (desktop only) and OGLES2 (experimental)
|
||||||
video_driver (Video driver) enum opengl null,software,burningsvideo,direct3d8,direct3d9,opengl,ogles1,ogles2
|
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.
|
# Radius of cloud area stated in number of 64 node cloud squares.
|
||||||
|
|
Loading…
Reference in New Issue