You ONLY need to reload the textures if you lose the EGL context.
Here's an easy way to check, based off my current published wallpapers:
Let me know if this is what you were looking for ;-)
JS
Code Snippet:
GL10 _gl;
public void onSurfaceChanged(GL10 gl, int width, int height) {
Log.d(TAG, "SorenRenderer:onSurfaceChanged");
this.width = width;
this.height = height;
if( !setGL( gl ) ) {
// You need to fully reload textures here.
}
else {
// Run normally, no reload
}
// Only reinit when the gl context is lost.
public boolean setGL( GL10 $gl ) {
if ( $gl == _gl ) {
Log.d(SorenService.TAG, "Using same gl context.");
return true;
}
Log.d(SorenService.TAG, "Using new gl context.");
_gl = $gl;
return false;
}
Use it in your