Previous Thread
Next Thread
Print Thread
Android Pause/Resume #117874 09/18/20 03:32 PM
Joined: Jan 2020
Posts: 10
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 10
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

Re: Android Pause/Resume [Re: Yash Anand] #117875 09/18/20 03:55 PM
Joined: Mar 2001
Posts: 16,593
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,593
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.

Re: Android Pause/Resume [Re: R. Belmont] #117901 09/24/20 04:05 PM
Joined: Jan 2020
Posts: 10
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 10
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).


Moderated by  R. Belmont 

Who's Online Now
1 registered members (Golden Child), 39 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,818
Posts116,110
Members4,917
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3