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
  • 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

Reply
  • 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

Children