OH_NativeImage_AttachContext

Function OH_NativeImage_AttachContext 

Source
pub unsafe extern "C" fn OH_NativeImage_AttachContext(
    image: *mut OH_NativeImage,
    textureId: u32,
) -> i32
Available on crate feature native_image only.
Expand description

Attach the OH_NativeImage to Opengl ES context, and the Opengl ES texture is bound to the

GL_TEXTURE_EXTERNAL_OES, which will update by the OH_NativeImage.

This interface is a non-thread-safe type interface.

Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeImage

§Arguments

  • image - Indicates the pointer to a OH_NativeImage instance.

  • textureId - Indicates the id of the Opengl ES texture which the native image attached to.

§Returns

  • Returns an error code, 0 is success, otherwise, failed.

Available since API-level: 9

Version: 1.0