gles2_texture_get_handle


Description:

public Bool gles2_texture_get_handle (Texture texture, uint handle, uint target)

Gets an OpenGL ES 2.0 texture handle for a Texture that can then be referenced by a GLES2Context.

As well as returning a texture handle the texture's target (such as GL_TEXTURE_2D) is also returned.

If the Texture can not be shared with a GLES2Context then this function will return false.

This api does not affect the lifetime of the CoglTexture and you must take care not to reference the returned handle after the original texture has been freed.

<note>This interface is only intended for sharing textures to read from. The behaviour is undefined if the texture is modified by a GLES2 context.</note>

<note>This function will only return true for low-level Texture<!-- -->s such as Texture2D or Texture3D but not for high level meta textures such as Texture2DSliced</note>

<note>The handle returned should not be passed directly to a system OpenGL ES 2.0 library, the handle is only intended to be used via a CoglGLES2Vtable or via libcogl-gles2.</note>

Parameters:

texture

A Texture

handle

A return location for an OpenGL ES 2.0 texture handle

target

A return location for an OpenGL ES 2.0 texture target

Returns:

true if a handle and target could be returned otherwise false is returned.


Namespace: Cogl
Package: doc