简体   繁体   English

是否有人在打开了OpenGLES2和MultiSampling的iOS 4.3.3上遇到了奇怪的alpha混合错误?

[英]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. 我在具有OpenGLES2的iOS 4.3.3上启用了多采样支持,并且渲染效果非常糟糕,好像颜色是RGB565而不是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). 事实是,要么关闭多重采样,要么将相同的ipa部署到iOS 5设备(这表明我确实正确开启了多重采样),不会发生此问题,除了关闭多重采样会使它非常丑陋(这也表示多样本在大多数情况下都有效。

The test case is very simple, just render a quad with an texture attached in ortho projection mode, the color format of texture isRGBA8888. 测试用例非常简单,只需渲染带有正交投影模式下附加纹理的四边形,纹理的颜色格式为RGBA8888。

Anyone has ever met the same problem before? 有人遇到过同样的问题吗? Is this a bug of Apple SDK? 这是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 顺便说一句,我使用的SDK是Xcode 4.3.2附带的SDK,ios部署目标设置为4.0

Turns out the root cause is the eaglLayer.drawableProperties was set to kEAGLColorFormatRGB565. 原来的根本原因是eaglLayer.drawableProperties设置为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. 我想知道这是否由采样缓冲区(RGBA8)和表面缓冲区(RGB565)的不同颜色格式引起,然后我将采样缓冲区更改为GL_RGB565,但问题仍然没有解决。

Maybe this is something not well implemented regarding glResolveMultisampleFramebufferAPPLE? 也许关于glResolveMultisampleFramebufferAPPLE的实现不是很好吗? Anyway the problem does not exist on iOS 5 device. 无论如何,iOS 5设备上不存在该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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