Android: add OpenGL ES 2 support (#9715)
authorMaksim <MoNTE48@mail.ua>
Wed, 22 Apr 2020 18:03:46 +0000 (20:03 +0200)
committerGitHub <noreply@github.com>
Wed, 22 Apr 2020 18:03:46 +0000 (20:03 +0200)
.. and bump gradle to 3.6.3

build/android/app/build.gradle
build/android/build.gradle
src/client/renderingengine.cpp

index 6a34a6d70d1e0507b2498bdc34073a5df287d02e..9d14cdab8fcc93e0dc6836f9aac7a12538aff8ad 100644 (file)
@@ -63,8 +63,12 @@ task prepareAssets() {
        copy {
                from "${projRoot}/builtin" into "${assetsFolder}/builtin"
        }
-       copy {
+       /*copy {
+               // ToDo: fix Minetest shaders that currently don't work with OpenGL ES
                from "${projRoot}/client/shaders" into "${assetsFolder}/client/shaders"
+       }*/
+       copy {
+               from "../native/deps/Android/Irrlicht/shaders" into "${assetsFolder}/client/shaders/Irrlicht"
        }
        copy {
                from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts"
@@ -73,8 +77,7 @@ task prepareAssets() {
                from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}"
        }
        /*copy {
-               // locales broken right now
-               // ToDo: fix it!
+               // ToDo: fix broken locales
                from "${projRoot}/po" into "${assetsFolder}/po"
        }*/
        copy {
index b02e8c6df61f961bf2d8cc98b51f07276010ba90..c4de09bf8aaebbd0003d02192a97a0afba7e5010 100644 (file)
@@ -15,7 +15,7 @@ buildscript {
                jcenter()
        }
        dependencies {
-               classpath 'com.android.tools.build:gradle:3.6.2'
+               classpath 'com.android.tools.build:gradle:3.6.3'
                classpath 'org.ajoberstar.grgit:grgit-gradle:4.0.2'
                // NOTE: Do not place your application dependencies here; they belong
                // in the individual module build.gradle files
index eae6ca7d3732d630c7d5ab41802c9a281afb7e89..f5aca8f58f82a82b514f80995b879d3a83fc4555 100644 (file)
@@ -130,12 +130,9 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
        params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
        params.ZBufferBits = 24;
 #ifdef __ANDROID__
-       // clang-format off
        params.PrivateData = porting::app_global;
-       params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM + "media" +
-               DIR_DELIM + "Shaders" + DIR_DELIM).c_str();
-       // clang-format on
-#elif ENABLE_GLES
+#endif
+#if ENABLE_GLES
        // there is no standardized path for these on desktop
        std::string rel_path = std::string("client") + DIR_DELIM
                        + "shaders" + DIR_DELIM + "Irrlicht";