1

or explain me what this means, because everything works perfectly.

OpenGL error 0x0506 in -[CCGLView swapBuffers] 280
OpenGL error 0x0506 in -[CCGLView swapBuffers] 280
OpenGL error 0x0506 in -[CCGLView swapBuffers] 280
OpenGL error 0x0506 in -[CCGLView swapBuffers] 280
OpenGL error 0x0506 in -[CCGLView swapBuffers] 280

I use storyboards and cocos2d. cocos2d is used only for sprite generation

Rost
  • 265
  • 1
  • 11
  • 1
    Probably it is the same problem then here: [Cocos2D 2.0 - Zillions of OpenGL errors](http://stackoverflow.com/questions/11662770/cocos2d-2-0-zillions-of-opengl-errors) the answer at least is about the `0x506` error – t.niese May 31 '13 at 13:37
  • I read this answer. But I don't have draw function. I just initialize cocos2d and then these errors appears – Rost May 31 '13 at 14:17
  • Maybe this: http://stackoverflow.com/questions/9914914/cocos2d-2-0-opengl-errors ? – Robert May 31 '13 at 14:51

1 Answers1

1

I've started to get such errors when migrated to autolayout in iOS 6.0. The problem was because of incorrect frame size for CCGLView:

CCGLView *glView = [CCGLView viewWithFrame:container.frame pixelFormat:kEAGLColorFormatRGB565 depthFormat:0 preserveBackbuffer:NO sharegroup:nil multiSampling:NO numberOfSamples:0];

When I output container.frame into console, I get {{0, 0}, {0, 0}}. What's strange because in the storyboard container view has a correct size. It works fine when I manually set frame:

CCGLView *glView = [CCGLView viewWithFrame:CGRectMake(115, 37, 195, 253) pixelFormat:kEAGLColorFormatRGB565 depthFormat:0 preserveBackbuffer:NO sharegroup:nil multiSampling:NO numberOfSamples:0];

It's a quick fix and a starting point to dig deeper

Victor
  • 168
  • 1
  • 9