eglReleaseTexImage - EGL Reference Pages

## Name

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

## C Specification

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

## Parameters

`display`

  Specifies the EGL display connection.

`surface`

  Specifies the EGL surface.

`buffer`

  Specifies the texture image data.

## Description

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.

## Notes

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).

## Errors

`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

eglBindTexImage

Copyright © 2003-2014 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.