I have a major issue when trying to run my tiled game on my iPad device in debug-mode. Note that both the simulator and the profiler (release) works fine, but I don't get the console output on the real device.
I've googled the issue, and it appears that the error values in OpenGL varying from 0x0500 -> 0x0503 occur when:
A: A too large image is attempted loaded (My largest is 192 * 128)
B: A bad value is passed to a method within OpenGL.
Also, these error values give the same error message:
OpenGL error 0x0501 in -[EAGLView swapBuffers]
YET, I cannot figure out what I'm doing wrong. One Google-hit led me to this page:
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:autorotation?s=glview
However, I've tried both the default settings, and the minor tweaks shown in this guide. Still the same error.
I am not using any direct OpenGL calls directly - only what's called from CCTMXTiledMad and CCSprite. Nor have I changed any AppDelegate methods.
In a futile attempt to narrow the cause down more, I CCLOG'd pretty much all my code to see if anything didn't load properly. This also proved out not to be the cause of my issues.
As my experience with OpenGL is highly limited, I've copied the console log after launching my app on my iPad in debug-mode. I've edited some parts down, and removed my personal CCLOG's entirely, as they are not of importance.
cocos2d: cocos2d v1.0.0-rc
cocos2d: Using Director Type:CCDirectorDisplayLink
cocos2d: OS version: 5.0 (0x05000000)
cocos2d: GL_VENDOR: Imagination Technologies
cocos2d: GL_RENDERER: PowerVR SGX 535
cocos2d: GL_VERSION: OpenGL ES-CM 1.1 IMGSGX535-63.4.2
cocos2d: GL_MAX_TEXTURE_SIZE: 2048
2cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16
cocos2d: GL_MAX_SAMPLES: 4
cocos2d: GL supports PVRTC: YES
cocos2d: GL supports BGRA8888 textures: YES
cocos2d: GL supports NPOT textures: YES
cocos2d: GL supports discard_framebuffer: YES
cocos2d: compiled with NPOT support: NO
cocos2d: compiled with VBO support in TextureAtlas : YES
cocos2d: compiled with Profiling Support: NO
OpenGL error 0x0501 in -[ES1Renderer resizeFromLayer:]
OpenGL error 0x0501 in -[EAGLView swapBuffers]//Map loaded successfully
cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity (from 260->860, 5 calls)
//Player loaded successfully
OpenGL error 0x0501 in -[EAGLView swapBuffers]
If it is of any help, my app does from time to time recieve a memory-warning, although it at it's peak uses 11MB of memory.
EDIT:
I'm running iOS 5 and Xcode 4.2 beta