How to optimize the performance of glteximage2d on android?

I use opengles2.0 on android , to improve the texture upload performance , i have tried the direct texture mechanism ,the first step is calling eglCreateImageKHR(dpy, EGL_NO_CONTEXT,EGL_NATIVE_BUFFER_ANDROID, reinterpret_cast<EGLClientBuffer>(sBuffer), NULL) to create a eglimage, then copy pixel data to graphicbuffer which is used to create eglimage ,at last call glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)mImage) to bind eglimage to texture target.

in this way, the mainly cost of time is copy data to graphicbuffer (glEGLImageTargetTexture2DOES very fast ) , while compared to glteximage2d , the total time nearly not any improvement .
on the opposite , if copy framebuffer of gpu to cpu space, aka download texture , the direct texture way will faster than traditional glreadpixels

could somebody tell me why didn’t the direct texture way have obvious improvement than glteximage2d and have good optimization than glreadpixels ? thanks !

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.