I am creating a framework for OpenGL ES 2.0 for Android. How can I cleanly dispose of my OpenGL resources when my Android app is done?
I check for isFinished()
in the onPause()
event and then dispose of the resources but it calls the OpenGL functions from the main UI thread so it gives me an error (0x501
).
When I try to call isFinished()
inside my onDraw()
in my GLSurfaceView.Renderer
class, it is never called when I quit my app.
Anyone got any ideas?