Using same textures across different GLSurfaceVIews!

I ve different GLSurfaceViews, four of them in a single activity in android. Is it possible to share a texture between all these surfaceviews. I am nt able to use the texture ID generated in one surfaceview in another. So it is creating the same texture in all four and taking 4 times the memory. Is there a sample code or way or somting to adddress this issue?

I’m not familiar with GLSurfaceView, but presumably each of those create their own OpenGL context. If the API allows it you would have to set things up so that your GLSurfaceViews share the same OpenGL context (or the contexts are configured to share resources [1]). Depending on what you are doing it may be simpler to use one large GLSurfaceView and only render to portions of it using glViewport.

[1] for GLX GLX_ARB_create_context this is the ‘share_context’ argument to glxCreateContextAttribsARB