OH_NativeImage_Create

Function OH_NativeImage_Create 

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

Create a OH_NativeImage related to an Opengl ES texture and target.

This interface needs to be used in conjunction with OH_NativeImage_Destroy, otherwise memory leaks will occur.

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

Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeImage

§Arguments

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

  • textureTarget - Indicates the Opengl ES target.

§Returns

  • Returns the pointer to the OH_NativeImage instance created if the operation is successful,

returns NULL otherwise.

Available since API-level: 9

Version: 1.0