This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mali T764/RK3288: how to get the ion handler/address from egl window surface

We are using firefly board and run Android 4.4.4.

And we want to display the frame buffer (content generated from GPU) directly instead of using elgswap() for speed critical application.

But we meet one question, how to get the window surface's ion handler or frame buffer virtual address?

window surface is created via eglCreateWindowSurface(),

so how to get the ion handler or frame buffer virtual address?

After the handler or frame buffer virtual address is available, it could be converted to frame buffer physical address, then we could display the frame buffer directly.

Thanks in advance.

Parents
  • Hi, Anthony,

    In opengl ES 2.0, there is a function glEGLImageTargetTexture2DOES() could turn EGLImageKHR into a texture,

    But we now use opengl ES 3.0, I could not find corresponding functions or extensions.

    Someone sugget use glreadpixel() function to read data from framebuffer, but this funciton does not meet our performance requirement.

    How to figure this out?

    The opengl ES 2.0 sample codes are here, image is EGLImageKHR

        GLuint tname, name;

        // turn our EGLImage into a texture

        glGenTextures(1, &tname);

        glBindTexture(GL_TEXTURE_2D, tname);

        glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)image);

        // create a Framebuffer Object to render into

        glGenFramebuffers(1, &name);

        glBindFramebuffer(GL_FRAMEBUFFER, name);

        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tname, 0);


    Nehemiah

Reply
  • Hi, Anthony,

    In opengl ES 2.0, there is a function glEGLImageTargetTexture2DOES() could turn EGLImageKHR into a texture,

    But we now use opengl ES 3.0, I could not find corresponding functions or extensions.

    Someone sugget use glreadpixel() function to read data from framebuffer, but this funciton does not meet our performance requirement.

    How to figure this out?

    The opengl ES 2.0 sample codes are here, image is EGLImageKHR

        GLuint tname, name;

        // turn our EGLImage into a texture

        glGenTextures(1, &tname);

        glBindTexture(GL_TEXTURE_2D, tname);

        glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)image);

        // create a Framebuffer Object to render into

        glGenFramebuffers(1, &name);

        glBindFramebuffer(GL_FRAMEBUFFER, name);

        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tname, 0);


    Nehemiah

Children