简体   繁体   English

eglPresentationTimeANDROID():我可以使用microedition.khronos而不是android.opengl吗?

[英]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 EGLDisplayEGLContextEGLSurface However, eglPresentationTimeANDROID takes EGLDisplay and EGLSurface from android.opengl.EGLDisplay 然而, eglPresentationTimeANDROID需要EGLDisplayEGLSurfaceandroid.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.

相关问题 android.opengl和javax.microedition.khronos.opengles包之间有什么区别? - What is the difference between android.opengl and javax.microedition.khronos.opengles packages? javax.microedition.khronos.opengles。 GL10无法解决 - javax.microedition.khronos.opengles. GL10 can not be resolved 我在Android中需要javax.microedition.io,该怎么办? - I need javax.microedition.io in android, what can I do ? 我在Android中需要javax.microedition.io,该怎么办? - I need javax.microedition.io in android, what can I do? 如何克服Android中的/ AndroidRuntime(331):java.lang.NoClassDefFoundError:javax.microedition.io.Connector错误? - How can I overcome the /AndroidRuntime(331): java.lang.NoClassDefFoundError: javax.microedition.io.Connector error in Android? 我们可以使用libGDX代替ARcore中的OpenGL来渲染模型吗? - Can we use libGDX for rendering models instead of OpenGL in ARcore? 我们可以在Android的OpenGL ES 1.0上使用Freetype Text吗? 有什么方法可以只使用库而不是使用NDK吗? - Can we use Freetype Text on OpenGL ES 1.0 in Android? Is there any way to use it with just libraries instead of using NDK? 我可以在Android中使用50%而不是50px吗? - Can I use 50% instead of 50px in android? 我可以在Android +24上使用checkPermission而不是checkSelfPermission吗? - Can I use checkPermission instead of checkSelfPermission on android +24? 如何在 Android 工具栏中使用图标而不是标题? - How can I use an icon instead of a title in the Android Toolbar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM