use*_*675 3 opengl-es ipad ios retina-display
我遇到了一些问题,让UIView使用大型CAEAGLLayer来正确显示.如果帧高于某个大小(在任一维度上显然为768,且contentScaleFactor为2.0),则会使用先前版本缓冲区的扭曲图像重绘.
在Apple的GLPaint示例中重现它非常容易.PaintingView.m的硬编码contentScaleFactor为1.0,但如果将其更改为2.0:
self.contentScaleFactor = 2.0;
Run Code Online (Sandbox Code Playgroud)
并在Retina iPad(而不是模拟器)上运行它,当你绘制时你得到这样的东西:
这似乎kEAGLDrawablePropertyRetainedBacking是在Retina iPad上设置为YES 的错误,正如Orion在这个问题中报道的那样.使用设置为NO
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
Run Code Online (Sandbox Code Playgroud)
删除了闪烁的绘图,但GLPaint依赖于其画笔的保留背景,因此如果您这样做,它将无法正常工作.
我已经提交了一个关于此的错误报告(rdar:// 11070429),修改后的GLPaint作为此行为的测试应用程序.
| 归档时间: |
|
| 查看次数: |
1604 次 |
| 最近记录: |