Why can't I see certain OpenGL ES charts in th

2019-08-24 05:18发布

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.

Does anyone have a clue?

3条回答
Deceive 欺骗
2楼-- · 2019-08-24 05:56

Same things with my App. My textures are broken sporadically on the simulator (4.2). On the hardware everything looks fine.

查看更多
孤傲高冷的网名
3楼-- · 2019-08-24 05:59

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:

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.

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.

查看更多
【Aperson】
4楼-- · 2019-08-24 06:17

I don't know if this helps much, but I've seen all manner of strange behaviour on the simulator implementation of OpenGL ES: spurious images appearing; strange lighting on the first render pass; broken rendering to bitmaps, depending on when I call it. I'm no expert in OpenGL programming, so I could just be writing crap code, but there is definitely a noticeable difference in the behaviour of the simulator vs the real hardware.

Your experience suggests that maybe my problems aren't entirely my fault. :-)

查看更多
登录 后发表回答