How do you get ANativeWindow from a SurfaceTexture in the NDK

前端 未结 1 386
梦毁少年i
梦毁少年i 2020-12-10 15:54

I\'ve got some OpenGL ES code that has been rendering to a GLSurfaceView, and I\'m currently modifying it to work with either SurfaceView and

相关标签:
1条回答
  • 2020-12-10 17:00

    What you need to do in API 16+ is create a Surface object, passing the SurfaceTexture as an argument to the constructor (which was introduced in API 14). Pass that Surface to ANativeWindow_fromSurface() as usual.

    0 讨论(0)
提交回复
热议问题