Android Port

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
luthyr
Posts: 69
Joined: Wed Dec 30, 2009 5:47 pm

Re: Android Port

Post by luthyr »

The cause seems to be when I have this in the AndroidManifest.xml:

Code: Select all

android:screenOrientation="landscape"
I'm using a Galaxy S4, Android 4.4.2.
BinMa
Posts: 19
Joined: Wed Feb 19, 2014 8:59 am

Re: Android Port

Post by BinMa »

Nadro recomended a white paper about native activity lifecycle.
http://developer.download.nvidia.com/as ... p_note.pdf
Read the " “Forcing” Landcape or Portrait Orientation" chapter, and if SDK>13 ,your should use

Code: Select all

android:configChanges="orientation|keyboardHidden|screenSize"
to replace the origin

Code: Select all

android:configChanges="orientation|keyboardHidden"
in your AndroidManifest.xml to avoid activity recreation.
luthyr
Posts: 69
Joined: Wed Dec 30, 2009 5:47 pm

Re: Android Port

Post by luthyr »

That worked. Thanks a lot for the solution. I'll take a look at that white paper as well.
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: Android Port

Post by ent1ty »

I have this weird problem on my 2012 Nexus 7. I'm rendering a glow effect using post-processing, which is best done with NPOT textures. This device can handle NPOT textures, I have made an app in JDK which used a NPOT render target texture and all was working fine. Now, here is my render target setup:
#0 albedo 320x184
#1 blur_v 320x184
#2 blur_h_add 320x184


So, the RTT containing the scene render is first downscaled, then blurred vertically, and finally blurred horizontally and added to the original texture. The last effect is rendered directly onto the screen.
This works everywhere I've tried so far, except for my aforementioned Nexus 7. What happens there is, I can only see the final blur, but not the actual scene. So the scene RTT is read by the first blur shader, there it works fine, but when i try to render it to screen in the last effect, the RTT reads as completely black. You can see the blur effects use NPOT textures, albeit somewhat smaller ones, and render just fine. When I use POT RTTs it suddenly works. Do you think there is any chance of fixing this, maybe it's something to do with how Irrlicht handles textures? It's like I can't read from the same RTT twice when it's NPOT.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Android Port

Post by hendu »

Driver problem, complain to your vendor.
FloatyBoaty
Posts: 32
Joined: Thu Aug 21, 2014 11:39 pm

Re: Android Port

Post by FloatyBoaty »

luthyr wrote:The cause seems to be when I have this in the AndroidManifest.xml:

Code: Select all

android:screenOrientation="landscape"
I'm using a Galaxy S4, Android 4.4.2.
Also available is "sensorLandscape" and "sensorPortrait".
FloatyBoaty
Posts: 32
Joined: Thu Aug 21, 2014 11:39 pm

Re: Android Port

Post by FloatyBoaty »

I would like to request that the OGLES1&2 drivers be added to the SDL device - for simpler cross-platform building.

---------

while-loop iteration through irr::core::list doesn't work correctly on android: doesn't stop.
for-loop must be used instead:

Code: Select all

 
    irr::core::list<irr::gui::IGUIElement*> glist = iGui->getRootGUIElement()->getChildren();
    irr::core::list<irr::gui::IGUIElement*>::Iterator itere = glist.begin();
    for(irr::u32 i = 0; i < glist.size(); i++, itere++)
    {
        irr::gui::IGUIElement* el = (irr::gui::IGUIElement*)*itere;
        irr::core::recti pos = el->getRelativePosition();
        pos.LowerRightCorner.X *= scalef;
        pos.LowerRightCorner.Y *= scalef;
        pos.UpperLeftCorner.X *= scalef;
        pos.UpperLeftCorner.Y *= scalef;
        el->setRelativePosition(pos);
    }
 
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

@FloatyBoaty: We can do so maybe after we merge with svn trunk. Right now the ogles drivers are only in our ogl branch - but we are working on getting these together for a while already.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
FloatyBoaty
Posts: 32
Joined: Thu Aug 21, 2014 11:39 pm

Re: Android Port

Post by FloatyBoaty »

CuteAlien wrote:@FloatyBoaty: We can do so maybe after we merge with svn trunk. Right now the ogles drivers are only in our ogl branch - but we are working on getting these together for a while already.
Maybe throw it in to an SDL2 driver. I may get to this soon.
BinMa
Posts: 19
Joined: Wed Feb 19, 2014 8:59 am

Re: Android Port

Post by BinMa »

@Nadro, Have you receive any report about the performance drop on some Power VR gpu devices after those gles2 fix from revision 4900 to 4908?
I've received some reports about that, and all of them are on Power VR gpus, typecally Power VR sgx544(used by mt6589 and exynos5410).
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Android Port

Post by Nadro »

In those revisions we implemented lighting and other missing calculations like eg. a fog thats why a perf drop is normal in this case. You shouldn't use built-in materials for a games where a performance is important (mostly all 3D games), but prepare shaders and materials dedicated for your game (in many situations just copy-paste from a built-in shaders with removed unnecessary lines of code).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BinMa
Posts: 19
Joined: Wed Feb 19, 2014 8:59 am

Re: Android Port

Post by BinMa »

Nadro wrote:In those revisions we implemented lighting and other missing calculations like eg. a fog thats why a perf drop is normal in this case. You shouldn't use built-in materials for a games where a performance is important (mostly all 3D games), but prepare shaders and materials dedicated for your game (in many situations just copy-paste from a built-in shaders with removed unnecessary lines of code).
Yes, I've be using my own shaders, after revision 4908, the performance on Adreno or Mali gpus is better than before (at least on Adreno220 is 35fps jump tp 55fps), while on Power VR (as I said before) is worse.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Android Port

Post by Nadro »

It's interesting, I'll check that with PowerVR 535. Thanks for the report.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
FloatyBoaty
Posts: 32
Joined: Thu Aug 21, 2014 11:39 pm

Re: Android Port

Post by FloatyBoaty »

FloatyBoaty wrote:
CuteAlien wrote:@FloatyBoaty: We can do so maybe after we merge with svn trunk. Right now the ogles drivers are only in our ogl branch - but we are working on getting these together for a while already.
Maybe throw it in to an SDL2 driver. I may get to this soon.
Diff here:
http://pastebin.com/0qTTxDaA
GL, GLES1, GLES2, Burnings
Linux, Android
Joysticks/Accelerometer, soft-keyboard, logging, file system
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: Android Port

Post by ent1ty »

I'd just like to remind everybody of my nightly Irrlicht builds for Android: http://www.fi.muni.cz/~xkrupick/and_irr/ as I've recently updated the web GUI to use bootstrap :P

Have fun, if you have any suggestions or questions, please PM me or send me a mail :)
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Post Reply