Mobile: fix OpenGL ES 2 support

master
MoNTE48 2020-04-20 00:35:36 +02:00
parent 01c980d153
commit 8a645b1c5f
4 changed files with 12 additions and 2 deletions

View File

@ -18,6 +18,9 @@ done
mkdir -p $DEST/fonts
cp ../../fonts/Retron2000.ttf $DEST/fonts/ # no PNG fonts because freetype
#mkdir -p $DEST/media
#cp -r native/deps/Android/Irrlicht/shaders $DEST/media/shaders
echo
echo "* Converting locale files:"
pushd ../../po

View File

@ -11,6 +11,10 @@ DEST=$(mktemp -d)
for dir in builtin textures; do
cp -r ../../$dir $DEST/$dir
done
#mkdir -p $DEST/media
#cp -r deps/irrlicht/shaders $DEST/media/shaders
mkdir -p $DEST/fonts
cp ../../fonts/Retron2000.ttf $DEST/fonts/ # no PNG fonts because freetype
mkdir -p $DEST/games

View File

@ -17,5 +17,6 @@ cd ../..
mkdir -p ../irrlicht
cp lib/iOS/libIrrlicht.a ../irrlicht/
cp -r include ../irrlicht/include
cp -r media/Shaders ../irrlicht/shaders
echo "Irrlicht build successful"

View File

@ -582,10 +582,12 @@ bool ClientLauncher::create_engine_device()
params.EventReceiver = receiver;
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
params.ZBufferBits = 24;
#if defined(__ANDROID__) || defined(__IOS__)
#ifdef __ANDROID__
params.PrivateData = porting::app_global;
params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM +
"media" + DIR_DELIM + "Shaders" + DIR_DELIM).c_str();
#endif
params.OGLES2ShaderPath = std::string(porting::path_share + DIR_DELIM +
"media" + DIR_DELIM + "shaders" + DIR_DELIM).c_str();
#endif
device = createDeviceEx(params);