Android black GUIs

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Android black GUIs

Post by LunaRebirth »

While using EDT_OGLES1, everything (including GUI Images) were white and only other GUIs (like buttons and editboxes) were visible.

While using EDT_OGLES2, it's almost opposite. GUI Images appear just fine, but other GUIs (like buttons and editboxes) are black.
Using ogl branch 5460
Last edited by LunaRebirth on Tue Jul 11, 2017 4:51 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

First one sounds like you might use textures which are not power-of-two in sizes. Many phones don't support that. Not sure about second one. Does this also happen with the default-example from Irrlicht? Otherwise I need some code to reproduce.
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 black GUIs

Post by LunaRebirth »

Yes, it also happens on the default example
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

Huh - I thought those worked for you in the past :-(
Any warnings/errors?
Also which Android version?

(unfortunately really hard for me to debug as I only have 2 outdated android devices myself for testing).
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 black GUIs

Post by LunaRebirth »

I was rewriting some things and never got to Android development with OGLES 2 until the other day.

No warnings or errors printing through the irrlicht logger.

Happens on both, Andy Emulator, and my Droid Turbo 2 running version 7.0

One thing that does happen, I'm unsure where it's coming from until I divide and conquer it, but I'm getting GL_INVALID_OPERATION. My best guess as of now is that it's coming from an IGUIListBox as I'm not able to add items to it. Doesn't do this in the example though
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

Hm, GL_INVALID_OPERATION comes from low level opengl operations. And basically to debug one would have to hunt the exact opengl command which is causing it.

Google's Android emulator never worked well for NDK development - especially in combination with 3D.

I can check if there are any new problems on my phone with the Irrlicht example. Maybe some change messed it up. Are you using the current svn ogl-es version?
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 black GUIs

Post by LunaRebirth »

Yeah I'm using brach 5460, I believe it's still the most current version
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

Did run example with es1 and es2, but still fine on my phone :-( But I checked in a minor change - it will now print out line-number additional to the opengl errors - so we can at least figure out where the GL_INVALID_OPERATION is coming from.
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 black GUIs

Post by LunaRebirth »

Hmm what svn version did you try it with that didn't have this issue?
I've been trying to ignore it, but obviously that's impractical for when I'm ready to release my project.
Currently I have to type something and then highlight it in editboxes to see the text, since the text is black and the edit box is black.
I was looking at the source code but can't find any leads to where the issue is lying.

I'll continue looking around.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

I tried the version at the date I wrote my last post. Thought I did a few more changes in ES2 since then as I found some problems when working on my current project. But - I added line-number to the error output - so if you can give me that we are maybe a tiny step closer to figure out where it comes from (not always - as often the error-check is too late as we don't run it after all GL functions).
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 black GUIs

Post by LunaRebirth »

I'm getting GL_INVALID_OPERATION: 1098
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Android black GUIs

Post by LunaRebirth »

The invalid operation isn't related to the black GUIs I've found.
If I have nothing but buttons, which are still shown as black, I don't get the GL_INVALID_OPERATION
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android black GUIs

Post by CuteAlien »

1098 seems to be in COGLES2Driver::draw2DImage. Basically the trick to figure out what's causing it is adding more testGLError calls to find out which OpenGL command is causing it. For example add another testGLError(__LINE__); at the start of the COGLES2Driver::draw2DImage. If that one isn't triggered then we know it's one of the commands inside the function. If it's also triggered then it's some earlier setup (likely texture generation - I'll have to check later if I can add some more checks in there - all opengl drivers should have testGLError, so I can probably add some calls to it in COpenGLCoreTexture constructor).
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 black GUIs

Post by LunaRebirth »

Yes, if I put the testGLError at the beginning of COGLES2Driver::draw2DImage, it is triggered
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Android black GUIs

Post by LunaRebirth »

It might be worth mentioning on a new thread, but draw2DRectangle isn't drawing anything either. I'm wondering if that's due to a similar reason or not.
Post Reply