I would like to render Open GL frames to client memory so I can use the pixel data in other APIs, and I need to do this very quickly.
The bottleneck for me is getting the pixel data from Open GL to program memory. I've tried the following methods with success, but they are all too slow (about 70ms per frame):
eglLockSurfaceKHR() followed by eglQuerySurface() w/ EGL_BITMAP_POINTER_KHR
I see there are other APIs like glTexDirectVIV and EGL Images (as documented at Using OpenGL ES to Accelerate Apps with Legacy 2D GUIs | Intel® Software ) but I haven't been able to get them to work because they all seem to be designed for pushing data from program memory to Open GL, but not from Open GL to program memory.
I've also tried using a Pixmap Surface, but that also seems to be one-way (e.g. program memory to OpenGL); I just get a black pixmap after drawing my scene. I tried using glFlush() and glFinish() to ensure the OpenGL pipeline was finished, but that resulted in a program crash at the glFinish() call.
What's the fastest way to render an OpenGL frame to program memory so it can be used in other APIs?
I'm using Windows Embedded Compact 2013 on an iMX6DL board.