Android版的OpenGL ES 1.1闪烁 [英] Android OpenGL ES 1.1 flickering

查看:409
本文介绍了Android版的OpenGL ES 1.1闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你推广自己的Andr​​oid项目中,我发现了一个奇怪的。

While you are promoting my Android project, I discovered a strange.

我可以显示海洋地图的Andr​​oid OpenGL ES的2D图形。

I can display the map in the ocean Android OpenGL ES 2D graphics.

所以,可以仅用于确定对象的相顺序,该值减少到大约0.0001 Z轴

So, to be used only to determine the phase order of the object, the value is reduced to about 0.0001 Z-axis.

我尝试过的对象在此期间的大小1000次。

I tried over 1000 times the size of the object In the meantime.

然后,根据变焦的现象/缩小,跳动发生的某些对象。

Then, a phenomenon depending on the zoom in / zoom out, some objects flickering occurred.

为什么出现这样的问题?

Why such problems occur??

这是目标的问题,终端固有的这个不能,如果解决?

It is the problem of the target terminal-specific this can not be resolved if?

或者是Android的OpenGL ES的本身呢?

Or is it a problem of Android OpenGL ES itself?

***更多....
下面的照片是你的屏幕截图是什么,每次实际设备的屏幕。

***More.... The photo below is what you screen shot every time the screen of the actual device.

***我时出现这样的现象,以放大/每次缩小

***I occurs when such a phenomenon to zoom in / zoom out each time.

推荐答案

我假设你遇到的是的 Z-战斗 http://en.wikipedia.org/wiki/Z-fighting

I assume what you are experiencing is z-fighting: http://en.wikipedia.org/wiki/Z-fighting

此结果是由于这样的事实,你的对象靠得太近,以使z缓冲器对某些像素无法区分哪个之间的像素是低于或高于另一个。
你现在有三种选择:

This results due to the fact that your objects are too close together so that the z-buffer for certain pixels can't distinguish between which pixel is below or above the other. You have three choices now:

1)调整投影的,具体调整的 znear zfar 值。在这里阅读更多: http://www.opengl.org/archives/resources /faq/technical/depthbuffer.htm

1) Adjust your projection, specifically adjust znear and zfar values. Read more here: http://www.opengl.org/archives/resources/faq/technical/depthbuffer.htm

2)增加两个对象之间的距离

2) Increase the distance between both objects

3)由于您绘制的是2D的场景,你可以使用正交投影。在这种情况下,它可能是值得不使用深度缓冲可言,只是借助后面的物体前面(画家算法,的 http://en.wikipedia.org/wiki/Painters_algorithm )。

3) Since you are drawing a 2D scene, you might use orthogonal projection. In that case it might be worth not to use depth buffering at all and just draw the objects from back to front (Painters Algorithm, http://en.wikipedia.org/wiki/Painters_algorithm).

这篇关于Android版的OpenGL ES 1.1闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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