this is a weird one. I have a basic application (dashboard, ...) and a GLSurfaceview in which I draw 3D objects and textures. All runs pretty but when I go back in other activities, hmm well a screenshot is better than words:
This is the dashboard before
this is the opengl:
And this is my dashboard when I press back:
As you can see, the images are gone and text too. I run on 4.0+ so I suppose this is because android draws elements with opengl, as it doesn't do that on my 2.2 device.
Do you have an idea of what is causing this? It does not happen when I don't use texture btw.
Ok I found what was wrong to me. I was deleting textures on the UI Thread, by calling mTextureManager.deleteAllTextures()
on my fragment's onPause();
I solved it by deleting my textures with a
mSurfaceView.queueEvent(new Runnable(){
//delete all textures here
}
Hope this will help other guys...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With