I'm drawing a waveform programmatically by drawing vertical lines using
glDrawArrays(GL_LINES, 0, noOfVertices);

I've enabled kEAGLDrawablePropertyRetainedBacking on my GLKView and am getting the results I want.
My waveform that is drawn programmatically is being retained and OpenGL ES doesn't need to redraw the prior waveform bits for every frame.
However, I have an issue - when my app resigns (goes into background), and comes again to the foreground, the previous drawn OpenGL drawn objects are cleared. I actually see what I previously drew for a split second, and then it is cleared away.
I commented out all the glClear commands in my code, but it doesn't help. The clearing on the app coming into foreground still happens.

In my case, redrawing all the lines of the waveform is not really an option as it's resource intensive.

How do I retain the backing even when my app resigns ? Many thanks for your help here.