相关疑难解决方法(0)

如何从NDK中的SurfaceTexture获取ANativeWindow

我有一些OpenGL ES代码已经渲染到了GLSurfaceView,我正在修改它以使用SurfaceViewTextureView.

我在本机代码中需要的共同元素是:ANativeWindow.

因为SurfaceView我通过传递Surface到:

m_jwindow = ANativeWindow_fromSurface(env, surface);
Run Code Online (Sandbox Code Playgroud)

对于TextureView,我接受SurfaceTexture,在API 14中,我可以使用:

m_jwindow = ANativeWindow_fromSurfaceTexture(env, surface);
Run Code Online (Sandbox Code Playgroud)

但是,在Jellybean中删除了该功能.我想留下,我怎样才能ANativeWindowSurfaceTexture在API 16+?

android android-ndk

7
推荐指数
1
解决办法
5399
查看次数

标签 统计

android ×1

android-ndk ×1