ReleaseTexImage on Andorid 9 using SurfaceTexture in detached mode

56 views
Skip to first unread message

Prajval M

unread,
Dec 9, 2020, 8:48:14 PM12/9/20
to android-ndk
Hi all,

I'm using SurfaceTexture in detached mode i.e SurfaceTexture(isSingleBufferedSurface) to create a surface texture and creating a Surface and using it in native code. 

While updating SurfaceTexture I'm calling ReleaseTexImage which works perfectly fine in Android 10. 
But in Android 9, I need to fake by attaching SurfaceTexture to GLContext using attachToGLContext for which I need to generate a texName using glGenTextures to call ReleaseTexImage, else it crashes.

However, glGenTextures is always returning me a 0 texName which could only mean that GLContext is not set on the thread. So how can I create a GLContext on the thread as current GLContext or share it from main thread so that I can use glGenTextures ? 

Also, how do I get ReleaseTexImage working on android 9 in detached mode of SurfaceTexture without faking this ?

Also all the above are android java related
Reply all
Reply to author
Forward
0 new messages