我想在我的 ExtendedGLSurfaceView(从 GLSurfaceView 扩展)中使用 eglPresentationTimeANDROID。
方法出现在:
EGLExt.eglPresentationTimeANDROID(android.opengl.EGLDisplay display, android.opengl.EGLSurface surface, long time);
我的主要问题是 GLSurfaceView 使用 javax.microedition 中的 。但是,EGLDisplay、EGLContext 和 EGLSurface .khronos.egleglPresentationTimeANDROID 从 android.opengl.EGLDisplay
EGLDisplay 和 EGLSurface
有什么快速修复方法吗?还是我需要重做所有的 ExtendedGLSurfaceView 才能使用 android.opengl 类?
最佳答案
我认为这不重要。 IIRC,这一切都变成了引擎盖下的同一件事。 EGL10 和 EGL14 类只是底层 native 代码的不同接口(interface)。
不过,我不能保证情况总是如此,因此将您的代码更新到较新的版本会更安全。 EGL14 自 API 17 (Android 4.2) 以来一直存在,我认为最近的 Android 正在使用 EGL 1.5。 This code在 EGL 1.0 和 1.4 中实现了两次,因此它可以作为一个移植示例。
FWIW,您可能会找到 this answer感兴趣。
关于android - eglPresentationTimeANDROID() : Can I use microedition. khronos 而不是 android.opengl?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39969146/