Android: add OpenGL ES 2 support (#9715)

.. and bump gradle to 3.6.3
This commit is contained in:
Maksim 2020-04-22 20:03:46 +02:00 committed by GitHub
parent 5355cb1d87
commit 6ba44d7452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -63,8 +63,12 @@ task prepareAssets() {
copy { copy {
from "${projRoot}/builtin" into "${assetsFolder}/builtin" 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" from "${projRoot}/client/shaders" into "${assetsFolder}/client/shaders"
}*/
copy {
from "../native/deps/Android/Irrlicht/shaders" into "${assetsFolder}/client/shaders/Irrlicht"
} }
copy { copy {
from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts" from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts"
@ -73,8 +77,7 @@ task prepareAssets() {
from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}" from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}"
} }
/*copy { /*copy {
// locales broken right now // ToDo: fix broken locales
// ToDo: fix it!
from "${projRoot}/po" into "${assetsFolder}/po" from "${projRoot}/po" into "${assetsFolder}/po"
}*/ }*/
copy { copy {

View File

@ -15,7 +15,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { 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' classpath 'org.ajoberstar.grgit:grgit-gradle:4.0.2'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -130,12 +130,9 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu"); params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
params.ZBufferBits = 24; params.ZBufferBits = 24;
#ifdef __ANDROID__ #ifdef __ANDROID__
// clang-format off
params.PrivateData = porting::app_global; params.PrivateData = porting::app_global;
params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM + "media" + #endif
DIR_DELIM + "Shaders" + DIR_DELIM).c_str(); #if ENABLE_GLES
// clang-format on
#elif ENABLE_GLES
// there is no standardized path for these on desktop // there is no standardized path for these on desktop
std::string rel_path = std::string("client") + DIR_DELIM std::string rel_path = std::string("client") + DIR_DELIM
+ "shaders" + DIR_DELIM + "Irrlicht"; + "shaders" + DIR_DELIM + "Irrlicht";