Accessing texture data from the application side on Android

Showing results for 
Search instead for 
Did you mean: 

Accessing texture data from the application side on Android

Contributor I


Currently I create a GraphicsBuffer object, create an EGLImage and bind that EGLImage to a texture and use it as a render target. After that, I can access the underlying graphics buffer data from the application. This works fine in every other device with different GPUs but not on a Huawei device with an Immersion.16 GPU. There's no error generated anywhere, but the buffer from the GraphicsBuffer object I created is just filled with zeroes only. The same problem is also mentioned in this thread too, without any workaround/solution: Is Android direct texture supported on imx6q?

I also found about glTexDirectVIV and glTexDirectVIVMap methods but apparently they only support writing to a texture buffer, not reading from it. Is there a known working way of accessing texture data on Vivante GPUs? Any help is appreciated.

Thanks in advance

Labels (2)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi Ustun,

Similar behaviours with proper solution and code are in i.MX6: camera image processing with 16 bit per color channel (IPU->GPU->VPU) under Linux

Just from the top of my head I guess that If you like to get texture data after render to texture I recommend to use glReadPixels instead OpeGLES functions, once you had the buffer you can use glMapBudder to get the data.

Hope this helps

0 Kudos