ipad 3 - 使用kEAGLDrawablePropertyRetainedBacking和retina的openGL错误? [英] ipad 3 - openGL bug with kEAGLDrawablePropertyRetainedBacking and retina?

查看:111
本文介绍了ipad 3 - 使用kEAGLDrawablePropertyRetainedBacking和retina的openGL错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iOS openGL应用程序,它使用kEAGLDrawablePropertyRetainedBacking属性在前一帧的顶部绘制当前帧。这是获得运动轨迹等效果的廉价方式。

i have an iOS openGL app which uses the kEAGLDrawablePropertyRetainedBacking property to draw the current frame on top of the previous frame. it's a cheap way of getting effects like motion trails.

它适用于所有设备(包括iPhone w / retina)和所有设备模拟器,但在实际的iPad 3上设备,前一帧被垂直压缩到其先前大小的75%。

it works great on all devices (including iPhone w/ retina) and all device simulators, but on the actual iPad 3 device, the previous frame is vertically squished to 75% of its previous size.

例如,如果我要在屏幕底部绘制一个100 x 100平方每帧,
然后在第0帧我有一个正方形,在第2帧中有一个100 x 75的回声并向屏幕顶部偏移,在第三帧还有一个100 x 56的额外回声(56~ = 75 * 0.75)并且更偏向顶部,等等。 应该发生的是所有的回声都保持不变。

for example, if i were to draw a 100 x 100 square at the bottom of the screen each frame, then in frame 0 i have one square, in frame 2 there's an echo that's 100 x 75 and offset towards the top of the screen, in frame three there's an additional echo that's 100 x 56 (56 ~= 75 * 0.75) and is more offset towards the top, and so-on. what should happen is that all the echoes remain in place.

我已经验证了两台设备上的行为,所以我不认为这只是一个破碎的iP​​ad。

i've verified the behavior on two devices, so i don't think it's a just a broken iPad.

任何想法?

tia,
orion

tia, orion

推荐答案

我看到了这个错误。我对OpenGL一无所知,所以我无法真正深入研究用纹理来解决它,正如我所建议的那样,但在我的情况下,我能够根据教程中的教程切换到非常快速的Quartz 2D绘图实现。 http://blog.effectiveui.com/?p=8105 ,以及如何制作它适用于来自 https://stackoverflow.com/a/10870188/255489 的Retina。它实际上比我从Apple的GLPaint示例代码借来的代码要快得多。

I was seeing this bug. I don’t know anything about OpenGL, so I couldn’t really dig into solving it with textures, as has been suggested, but in my case I was able to switch to a very fast implementation of Quartz 2D drawing based on a tutorial from http://blog.effectiveui.com/?p=8105, plus how to make it work on Retina from https://stackoverflow.com/a/10870188/255489. It actually ended up being much faster than the code I had borrowed from Apple’s GLPaint sample code.

这篇关于ipad 3 - 使用kEAGLDrawablePropertyRetainedBacking和retina的openGL错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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