I've found what appears to be a bug. It causes cocos to break (stop updating) if any other view creates and uses an EAGLContext.
The problem seems to be that the EAGLView cocos uses includes code to save and restore the context in its swapBuffers method (presumably, to prevent it from interfering with other views that are drawing to different contexts) but, if another view has changed the current context without restoring it, all of OpenGL functions called by cocos are done prior to the context being set by EAGLView in the swapBuffers method.
Is there a good reason the correct context isn't set before doing drawing? Moving this code from EAGLView's swapBuffers method into the mainLoop fixed the problem in my application. Specifically, I added
<br />
EAGLContext *oldContext = [EAGLContext currentContext];</p>
<p> if(oldContext != openGLView_.context)<br />
[EAGLContext setCurrentContext:openGLView_.context];<br />
to the front of mainLoop and
<br />
if(oldContext != openGLView_.context)<br />
[EAGLContext setCurrentContext:oldContext];<br />
at the end, and removed the similar code for setting and restoring the context from the swapBuffers method.
Edit:
It occurs to me that creating textures with the wrong context will cause problems too. So simply moving the code as above does not fix everything.