[英]eglPresentationTimeANDROID(): Can I use microedition.khronos instead of android.opengl?
I want to use eglPresentationTimeANDROID in my ExtendedGLSurfaceView
(extended from GLSurfaceView). 我想在我的
ExtendedGLSurfaceView
(从GLSurfaceView扩展)中使用eglPresentationTimeANDROID 。
The method appears in: 该方法出现在:
EGLExt.eglPresentationTimeANDROID(android.opengl.EGLDisplay display, android.opengl.EGLSurface surface, long time);
My main issue is that GLSurfaceView
uses EGLDisplay
, EGLContext
and EGLSurface
from javax.microedition.khronos.egl
. 我的主要问题是
GLSurfaceView
使用来自javax.microedition.khronos.egl
EGLDisplay
, EGLContext
和EGLSurface
。 However, eglPresentationTimeANDROID
takes EGLDisplay
and EGLSurface
from android.opengl.EGLDisplay
然而,
eglPresentationTimeANDROID
需要EGLDisplay
和EGLSurface
从android.opengl.EGLDisplay
Is there is any quick fix? 有没有快速解决方案? Or do I need to redo all my
ExtendedGLSurfaceView
to use android.opengl
classes? 或者我是否需要重做所有的
ExtendedGLSurfaceView
才能使用android.opengl
类?
I don't think it matters. 我认为这不重要。 IIRC, it all turns into the same thing under the hood.
IIRC,它在引擎盖下变成了同样的东西。 The EGL10 and EGL14 classes are just different interfaces to the underlying native code.
EGL10和EGL14类只是底层本机代码的不同接口。
I can't guarantee that this will always be the case, though, so it's safer to update your code to the newer version. 但是,我无法保证始终如此,因此将代码更新到更新版本会更安全。 EGL14 has been around since API 17 (Android 4.2), and I think recent Android is using EGL 1.5.
自API 17(Android 4.2)以来,EGL14已经存在,我认为最近的Android正在使用EGL 1.5。 This code was implemented twice, with EGL 1.0 and 1.4, so it can serve as a porting example.
此代码实现了两次,使用EGL 1.0和1.4,因此它可以作为移植示例。
FWIW, you may find this answer of interest. FWIW,你可能会发现这个有趣的答案 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.