简体   繁体   中英

Anyone experienced weird alpha blending bug on iOS 4.3.3 with OpenGLES2 and MultiSampling turned on?

I enable multisampling support on iOS 4.3.3 with OpenGLES2, and the rendering result is awful, as if the color is in RGB565, not ARGB8888.

The thing is, either turn multisampling off, or deploying the same ipa to an iOS 5 device(which indicates that I did turn on multisampling correctly), the problem will not occur, except that turning multisampling off will make it very ugly(which also indicates that the multisample did work for most cases).

The test case is very simple, just render a quad with an texture attached in ortho projection mode, the color format of texture isRGBA8888.

Anyone has ever met the same problem before? Is this a bug of Apple SDK?

BTW, the SDK I used is the one shipped with Xcode 4.3.2, the ios deployment target is set to 4.0

Turns out the root cause is the eaglLayer.drawableProperties was set to kEAGLColorFormatRGB565.

But still, why the result is so different when turning multisampling on/off?

I was wondering if this caused by different color format of sampling buffer(RGBA8) and surface buffer(RGB565), then I changed the sampling buffer to GL_RGB565, but the problem still no solved.

Maybe this is something not well implemented regarding glResolveMultisampleFramebufferAPPLE? Anyway the problem does not exist on iOS 5 device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM