Android white images

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Android white images

Post by LunaRebirth »

So there's been some sort of bug I've known about for a while, but it didn't directly affect me so I blew it off.
A friend's phone couldn't run my apk correctly where images are all displayed as white. The entire screen was white, but you can still kinda see IGUIEditBoxes, and are able to click them <- That's been happening since I first started mobile development about a year ago.

This issue didn't affect my phone until the most recent Android update about 2 days(?) ago.
Now I can't run my apk because the login screen on my app is white and isn't displaying properly.

Just wanted to know if there was any information regarding this issue
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android white images

Post by CuteAlien »

I think last time I had white textures on some device the solution in the end was using ogl es2 instead of ogl es1. But maybe I remember wrong - it's been a long time by now.

Other possible trouble: Non power of 2 textures often mess up some devices.

Do you get any warnings/errors on the log?
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Android white images

Post by LunaRebirth »

Great, sounds simple enough.
Where can I use ogl es2 instead of 1?

I will check for any errors after I get home from work, strange thing is that my program was working fine before the latest Android update.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android white images

Post by CuteAlien »

Yeah, Android updates tend to mess up working applications (in older Android versions the system-keyboard also still worked fine with NDK, that only broke after some 4.x version).
About ES2: You can change the driver by simply selecting ES2. Compiling for ES2 on PC for testing you might have to link to some stuff. I think on Linux it needed: GLESv2, EGL and GL. Or maybe GLESv2 is already enough. But be aware that ES2 works very different. ES1 is a fixed function pipeline while ES2 is a shader pipeline without fixed functions. Which means you need shader materials. Irrlicht ogl-es branch comes with some ES2 shader which try to simulate the fixed-function materials, so unless you use some special features (like matrix uv transformations) it might already work. Those shaders are in media/Shaders and the example Makefile should already copy them to Android. But... to optimze speed you might want to modify them. Usually by kicking out everything you don't need in your materials. Shaders run per vertex and per pixel - so every line in there counts for speed. Advantage is - you can get even better speed on most machines (as usual with Android there are exceptions and some devices will have horrible shader support, but in general there will be more devices where shaders run better than the fixed function pipeline).
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
Post Reply