eglReleaseTexImage — Releases a color buffer that is being used as a texture

C Specification

EGLBoolean eglReleaseTexImage( EGLDisplay display,
  EGLSurface surface,
  EGLint buffer);



Specifies the EGL display connection.


Specifies the EGL surface.


Specifies the texture image data.


The specified color buffer is released back to the surface. The surface is made available for reading and writing when it no longer has any color buffers bound as textures.


If the specified color buffer is no longer bound to a texture (e.g., because the texture object was deleted) then eglReleaseTexImage has no effect. No error is generated.

The contents of the color buffer are undefined when it is first released. In particular, there is no guarantee that the texture image is still present. However, the contents of other color buffers are unaffected by this call. Also, the contents of the depth and stencil buffers are not affected by eglBindTexImage and eglReleaseTexImage.

After a color buffer is released from a texture (either explicitly by calling eglReleaseTexImage or implicitly by calling a routine such as glTexImage2D), all texture images that were defined by the color buffer become NULL (it is as if glTexImage was called with an image of zero width).


EGL_BAD_MATCH is generated if the surface attribute EGL_TEXTURE_FORMAT is set to EGL_NO_TEXTURE.

EGL_BAD_MATCH is generated if buffer is not a valid buffer (currently only EGL_BACK_BUFFER may be specified).

EGL_BAD_SURFACE is generated if surface is not an EGL surface, or is not a bound pbuffer surface.

See Also