You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read some code in x/mobile/app, specially, android.c and android.go. Gomobile will create Surface and eglContext very time when application resumed:
This will cause the application lost eglContext when activity is paused(eg: press Home). A simple way to avoid this is to preserve the eglContext(only destroy Surface) and reuse it when needed. I have also make some research:
PS: The sample app basic don't have the problem, cause it recreate the shader/index-buffer/vertex-buffer each time the window recreated, but it's impossible in a game with large amount of textures and buffers .
The text was updated successfully, but these errors were encountered:
I have read some code in
x/mobile/app
, specially,android.c
andandroid.go
. Gomobile will create Surface and eglContext very time when application resumed:This will cause the application lost eglContext when activity is paused(eg: press Home). A simple way to avoid this is to preserve the eglContext(only destroy Surface) and reuse it when needed. I have also make some research:
PS: The sample app basic don't have the problem, cause it recreate the shader/index-buffer/vertex-buffer each time the window recreated, but it's impossible in a game with large amount of textures and buffers .
The text was updated successfully, but these errors were encountered: