5

Can someone explain in simple terms what an egl image is, and an example of when I would want to use one? I know it can significantly increase performance, but I'm having trouble finding documentation. Before I try and really figure it out, I want to make sure its even worth learning.

Thanks.

Josh A.
  • 374
  • 3
  • 15

2 Answers2

11

So a year later, I have become more of an expert in Android graphics and actually wrote a white paper about EGL Images. If my company lets me publish the paper externally, I'll post it here. For the time being, here is a short answer.

An EGL Image is simply a texture whose content can be updated without having to re-upload to VRAM (meaning no call to glTexImage2D). One of the only drawbacks, besides increased code complexity, is that the application developer has to handle synchronization themselves. In apps that I've written, I had to implement my own "internal" swapchain of EGL Images and manage all the locking primitives myself. Thus, a call to eglSwapBuffers swaps front and back framebuffers as usual, but in a seperate thread there are 2 EGL Images swapping front-to-back as new content becomes available.

Josh A.
  • 374
  • 3
  • 15
  • Hi Josh, I have been working on similar work to get benefitted from sytem (low) level. Could you please let know, if you can share your white paper. that would be so help ful to me. thanks. – kzs Aug 26 '15 at 14:12
  • 2
    Gladly. Two caveats though, this information is slightly out of date now, and I do not have the source available for the test application I wrote. (I can look for it, but I'd have to ask my previous employer if I can share it... happy to be working in open source now :-p ) https://docs.google.com/file/d/0B_oQNe1U0rhqVnFWdnFFVXFuVlE/edit?usp=sharing – Josh A. Aug 26 '15 at 18:33
  • Can you share the sample app you mention in the paper? – Sandeep Datta Aug 27 '15 at 08:29
-2

The Khronos documentation is at:

http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image.txt

http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_base.txt

On the other hand, given how opaque most Khronos documentation is, this may not help much. I haven't been able to figure them out myself.

David Given
  • 13,277
  • 9
  • 76
  • 123