Vertex Z broken after app resumes from background on Android

I’m using kCCDirectorProjection2D mode with depth test and vertex z to reorder sprites. This works great, but on my Nexus 7 when the app is brought back from sleep the vertex z seems to be ignored. Even after reallocating the scene the vertex z is ignored, which leads me to believe it is a problem with the gl context not re-enabling depth testing. Any suggestions?

To reproduce use the following in app delegate

pDirector~~>setDepthTest; pDirector~~>setProjection(kCCDirectorProjection2D);

then use setVertexZ to change the order of a sprite.

Here is a followup in case anyone else has the same problem. When the app re-enters the foreground a call to CCDirector::sharedDirector()->setGLDefaultValues() is made. I simply appended my default values setDepthTest(true); setProjection(kCCDirectorProjection2D); to the end of the setGLDefaultValues() function and everything is working as expected now.

Thanks. Issue http://www.cocos2d-x.org/issues/2049 was created.

@Kevin H
I think the bug is fixed by this pull request:https://github.com/cocos2d/cocos2d-x/pull/2384