Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGL_KHR_IMAGE <- what is it and when should I use it

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.

like image 251
Josh A. Avatar asked Oct 03 '11 15:10

Josh A.


1 Answers

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.

like image 76
Josh A. Avatar answered Nov 02 '22 07:11

Josh A.