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

Use of EGL_IMAGE_PRESERVED_KHR in eglCreateImageKHR.

Hi,

I am trying to create a sample application where i am trying to use a EGLImage as texture. The EGLImage is created from a native pixmap using eglCreateImageKHR.

Most of the open source sample codes available over net  using eglCreateImageKHR has the last parameter(image attribute list) set to

NULL/EGL_IMAGE_PRESERVED_KHR is set to EGL_FALSE.

My query is what is the use of EGL_IMAGE_PRESERVED_KHR attribute and what is the difference b/w setting this attribute to EGL_FALSE and EGL_TRUE

and in which scenarios should i set this attribute to EGL_TRUE.

Thanks and Regards,

Prabal Kumar Ghosh

 

Parents
  • Hi pk.ghosh,

    The specification states the following:

    If it is set to true, then all pixel data values associated with <buffer> are preserved.

    <buffer> is the name (or handle) of a resource to be used as the EGLImage source, cast into the type EGLClientBuffer.


    What this means is, your input source buffer to create the EGLImage from, by default, will be undefined after the eglCreateImageKHR call.

    If you want the original source buffer to be preserved, i.e. its data not undefined... then set it to EGL_TRUE.


    I hope that helped.


    Michael McGeagh

Reply
  • Hi pk.ghosh,

    The specification states the following:

    If it is set to true, then all pixel data values associated with <buffer> are preserved.

    <buffer> is the name (or handle) of a resource to be used as the EGLImage source, cast into the type EGLClientBuffer.


    What this means is, your input source buffer to create the EGLImage from, by default, will be undefined after the eglCreateImageKHR call.

    If you want the original source buffer to be preserved, i.e. its data not undefined... then set it to EGL_TRUE.


    I hope that helped.


    Michael McGeagh

Children