Page 1 of 3

Android black GUIs

Posted: Wed May 24, 2017 3:36 am
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

Re: Android black GUIs

Posted: Wed May 24, 2017 9:37 am
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.

Re: Android black GUIs

Posted: Wed May 24, 2017 3:39 pm
by LunaRebirth
Yes, it also happens on the default example

Re: Android black GUIs

Posted: Wed May 24, 2017 4:44 pm
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).

Re: Android black GUIs

Posted: Wed May 24, 2017 5:26 pm
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

Re: Android black GUIs

Posted: Wed May 24, 2017 8:55 pm
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?

Re: Android black GUIs

Posted: Wed May 24, 2017 10:29 pm
by LunaRebirth
Yeah I'm using brach 5460, I believe it's still the most current version

Re: Android black GUIs

Posted: Thu May 25, 2017 2:58 pm
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.

Re: Android black GUIs

Posted: Thu Jul 13, 2017 5:55 pm
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.

Re: Android black GUIs

Posted: Thu Jul 13, 2017 8:36 pm
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).

Re: Android black GUIs

Posted: Sat Jul 15, 2017 1:14 am
by LunaRebirth
I'm getting GL_INVALID_OPERATION: 1098

Re: Android black GUIs

Posted: Sat Jul 15, 2017 1:30 am
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

Re: Android black GUIs

Posted: Sat Jul 15, 2017 7:29 am
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).

Re: Android black GUIs

Posted: Sat Jul 15, 2017 6:01 pm
by LunaRebirth
Yes, if I put the testGLError at the beginning of COGLES2Driver::draw2DImage, it is triggered

Re: Android black GUIs

Posted: Sat Jul 15, 2017 8:34 pm
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.