为什么在4.2 Simulator中看不到某些OpenGL ES图表? [英] Why can't I see certain OpenGL ES charts in the 4.2 Simulator?

查看:106
本文介绍了为什么在4.2 Simulator中看不到某些OpenGL ES图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个包含一些在OpenGL ES中绘制的图形的应用程序.这些图形中的每个图形都位于一个表格单元格中,当我按其中的某些图形时,它将以全屏模式打开. 自从我升级到iOS4.2以来,一切工作正常. 现在问题出在模拟器上,我无法在单元格中看到绘制的图形,但是在全屏模式下,我确实可以看到图表.没有设备的任何更改,仅在模拟器上并且仅在一种情况下. 行为与此处的其他Mac相同.

I am writing an application which contains some graphs drawn in OpenGL ES. each of these graphs are in a table cell, when I press some of those graphs, it is being opened in full screen mode. Everything worked perfectly since I upgraded to iOS4.2. Now the problem is in simulator, I can't see the drawn graph in cells, but in full screen mode I do see the chart. There are no changes no the device, it is only on the simulator and only in a case. The behavior is the same for other Mac's here.

有人知道吗?

推荐答案

这个类似的问题,4.2在Core Animation层中处理渲染缓冲区的方式发生了变化.来自 OpenGL ES编程指南:

As explained in this answer to this similar question, there has been a change in the way that 4.2 handles renderbuffers in Core Animation layers. From the OpenGL ES Programming Guide:

在iOS 4.2及更高版本中,性能 的核心动画"旋转次数 渲染缓冲区已显着 改进,现在是首选 内容之间的轮换方式 横向和纵向模式.为了最好 性能,请确保渲染缓冲区的 高度和宽度均为倍数 32像素.

In iOS 4.2 and later, the performance of Core Animation rotations of renderbuffers have been significantly improved, and are now the preferred way to rotate content between landscape and portrait mode. For best performance, ensure the renderbuffer’s height and width are each a multiple of 32 pixels.

看来,如果渲染缓冲区不是32像素的偶数倍,则它不会显示在模拟器中.这是模拟器中的一个错误,但是无论如何在任何情况下都应将渲染缓冲区的大小设为32的倍数,以提高性能.

It appears that if your renderbuffer isn't an even multiple of 32 pixels, it doesn't display in the Simulator. This is a bug in the Simulator, but you should probably make your renderbuffer a multiple of 32 in either dimension in any case to improve performance.

这篇关于为什么在4.2 Simulator中看不到某些OpenGL ES图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆