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