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

About argument specification of eglCreateImageKHR ()

When using MALI-T 820, what should be specified for the fourth argument of eglCreateImageKHR(), EGLClientBuffer buffer?
We have confirmed that eglCreateImageKHR() is supported as an OpenGL extension.

Parents
  • Thanks for the reply Daniele.

    My goal is to write EGLPixmap as a pixmap that you mentioned.
    > EGLImage eglImage = eglCreateImageKHR (dpy, ctx, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) pixmap, NULL);

    Should I check with the host platform to know the definition of the EGLClientBuffer structure?

Reply
  • Thanks for the reply Daniele.

    My goal is to write EGLPixmap as a pixmap that you mentioned.
    > EGLImage eglImage = eglCreateImageKHR (dpy, ctx, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) pixmap, NULL);

    Should I check with the host platform to know the definition of the EGLClientBuffer structure?

Children
  • Hi aki,

    You just need to be sure that the platform you are using supports the extension EGL_KHR_image_pixmap. The definition of EGLClientBuffer should already be available to you. The EGLClientBuffer is just an opaque handle to the resource and you don't need to know the internal structure.

    You just need to create a native_pixmap and the EGLSurface to be used in eglCreateImageKHR:

    egl_native_pixmap_t pixmap;

    //Fill pixmap with the proper data

    EGLSurface eglPixmap = eglCreatePixmapSurface(dpy, config, pixmap,  eglPixmap_attrib_list );

    //Create the eglImage from the eglPixmap

    EGLImage eglImage = eglCreateImageKHR (dpy, ctx, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer) eglPixmap, eglImage_attrib_list);

    Regards,

    Daniele

  • Thanks for the reply Daniele.

    I was able to solve the problem.
    Thank you.

  •   what did  you pass in eglPixmap_attrib_list , I have a buffer and I want to create a pixmap from that buffer and then create egl image.

    where should I use that buffer while creating pixmap.

    Thank you

    Sami