multisampling issue using one layer in cocos2d-x

multisampling issue using one layer in cocos2d-x
0.0 0



First wanted to say thanks for this great open source library.

I’ve gotten some code running together with cocos2d-x. One layer that I’ve integrated some polygon drawing code. Now it looks jagged since there is no anti-aliasing by default. No problem I thought and changed the code for initializing the EAGLView to use multisampling like this:

@ EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
pixelFormat: kEAGLColorFormatRGBA8
preserveBackbuffer: NO
sharegroup: nil
multiSampling: YES
numberOfSamples: 1 ];@

Now nothing shows and the log starts to spew:

OpenGL error 0x0506 in ~~
OpenGL error 0x0502 in~~[EAGLView swapBuffers]

in the console. This goes away if I set multiSampling to NO and numberOfSamples to 0. Just to compare if I take the cocos2d-iphone and use multi-sampling with the same type of content it works properly.

Anyone managed to get multisampling to work in cocos2d-x for iOS?

(BTW I’m using the simulator on my mac)

Thanks in advance!