OpenGL ES 1.1 likes to crash my iPhone program if anything goes slightly wrong.
Usually it happens somewhere inside glDrawArrays, with several glDestroyContext calls on stack.
Usually I'm bisecting the problem by inserting
{
GLint iErr = glGetError();
if (iErr != GL_NO_ERROR)
{
NSLog(@"GL error: %d (0x%x)", iErr, iErr);
}
}
all over the place.
However sometimes it is not enough. Are there any other ways to get useful diagnostics on the crash reasons?