ReleaseTexImage on Andorid 9 using SurfaceTexture in detached mode

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ReleaseTexImage on Andorid 9 using SurfaceTexture in detached mode

Prajval M
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

You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit