Can't create EGL surface when returning from standby/sleep
I'm trying to get my android 2.3 NativeActivity to resume successfully when returning from sleep mode.
It's a purely native activity using OpenGL.

I have used android:configChanges="orientation" in the manifest to avoid getting destroyed when entering sleep.

When I receive the APP_CMD_TERM_WINDOW, I unload my GL resources and terminate GL.

The problem appears when I try to initialize GL when I return from sleep mode. 
When I get the APP_CMD_INIT_WINDOW, and try to init GL as usual, I fail to create a new surface. 

eglCreateWindowSurface returns EGL_BAD_MATCH and it's game over...

Any thoughts? 









Can't create EGL surface when returning from standby/sleep
===

I'm trying to get my android 2.3 NativeActivity to resume successfully when returning from sleep mode.
It's a purely native activity using OpenGL.

I have used android:configChanges="orientation" in the manifest to avoid getting destroyed when entering sleep.

When I receive the APP_CMD_TERM_WINDOW, I unload my GL resources and terminate GL.

The problem appears when I try to initialize GL when I return from sleep mode. 
When I get the APP_CMD_INIT_WINDOW, and try to init GL as usual, I fail to create a new surface. 

eglCreateWindowSurface returns EGL_BAD_MATCH and it's game over...

Any thoughts? 








