Previous Thread
Next Thread
Print Thread
#117874 09/18/20 03:32 PM
Joined: Jan 2020
Posts: 17
Y
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 17
Hey People,

My config - Android (arm64), BGFX (backend GLES 2.0/Vulkan).
My screen comes out blank whenever there is a suspend resume or the activity goes into background and when I bring it back? Audio works and the rendering is happening (as seen in the draw->update_dimensions in drawbgfx.cpp).
Any suggestions?

Regards
Yash

Joined: Mar 2001
Posts: 16,612
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,612
Android isn't officially supported, especially in terms of phone-specific stuff like suspend/resume and backgrounding. I'd expect SDL2 to handle at least some of the details there but there's probably other things that need to be done.

Joined: Jan 2020
Posts: 17
Y
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 17
Hey RB,

Thanks for your reply. Really appreciate it. Sorry for the late reply was caught up in a whirlwind.

I know I need to do some stuff but am a little confused. Have seen the code too many times and need a fresh pair of eyes I guess now smile
I believe that both the EGL and the gles context must have been lost when the system comes into the foreground (android_egl_context_restore). However the old context which is stored while calling android_egl_context_backup still is exists but gives a black screen.

I also understand that I need to completely reinit the BGFX backend renderers (gles or vulkan). Is my understanding right here? Now the question is whether I create an event, push it into the event pool and then handle it or hack the SDL code and get to calling the renderer from the SDL as it did when the system initially came up (it may open a bag of worms I believe). Any kind of experiment would be a act of kindness smile

The gles context is still there when the system comes to android_egl_context_restore and I even get the texture requested (4877 - renderer_gl.cpp).

Joined: Jan 2020
Posts: 17
Y
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 17
Thanks RB. I was able to hack my way through and get this working. Not a pretty hack I presume smile but quite stable. Not many things were displaced.


Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
1 members (Reznor007), 47 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,835
Posts116,215
Members4,921
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.5