我想在ExtendedGLSurfaceView
中使用 eglPresentationTimeANDROID (从GLSurfaceView扩展)。
该方法出现在:
EGLExt.eglPresentationTimeANDROID(android.opengl.EGLDisplay display, android.opengl.EGLSurface surface, long time);
我的主要问题是GLSurfaceView
使用EGLDisplay
中的EGLContext
,EGLSurface
和javax.microedition.khronos.egl
。但是,eglPresentationTimeANDROID
从EGLDisplay
EGLSurface
和android.opengl.EGLDisplay
有没有快速解决方法?或者我是否需要重做所有ExtendedGLSurfaceView
以使用android.opengl
课程?
答案 0 :(得分:1)
我认为这不重要。 IIRC,它在引擎盖下变成了同样的东西。 EGL10和EGL14类只是底层本机代码的不同接口。
我无法保证始终如此,因此将代码更新到更新版本会更安全。自API 17(Android 4.2)以来,EGL14已经存在,我认为最近的Android正在使用EGL 1.5。 This code实施了两次,使用EGL 1.0和1.4,因此它可以作为移植示例。
FWIW,您可能会感兴趣this answer。