Skip to main content

OH_NativeImage_CreateWithSingleBufferMode

Function OH_NativeImage_CreateWithSingleBufferMode 

Source
pub unsafe extern "C" fn OH_NativeImage_CreateWithSingleBufferMode(
    textureId: u32,
    textureTarget: u32,
    singleBufferMode: bool,
) -> *mut OH_NativeImage
Available on crate features native_image and api-22 only.
Expand description

Create a OH_NativeImage related to an Opengl ES texture and target with textureId,

and choose whether to set single buffer mode.

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.

  • singleBufferMode - Whether to set single buffer mode.

§Returns

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

returns NULL otherwise.

Available since API-level: 22

Version: 1.0