Available on crate feature
native_image only.Expand description
Bindings to native_image
The native image module is used for associating a surface with an OpenGL external texture. It functions as the consumer of a graphics queue. You can use the APIs of this module to obtain and use a buffer, and output the buffer content to an OpenGL external texture.
The following scenario is common for native image development:
Use the native image APIs to create an OH_NativeImage instance as the consumer and obtain the corresponding OHNativeWindow instance (functioning as the producer). Use the native window APIs to fill in and flush the buffer, and then use the native image APIs to update the buffer content to an OpenGL ES texture.
Structs§
- OH_
OnFrame Available Listener api-11 - A listener for native image, use OH_NativeImage_SetOnFrameAvailableListener to register
Functions§
- OH_
Consumer ⚠Surface_ Create api-12 - Create a OH_NativeImage as a consumerSurface.
- OH_
Consumer ⚠Surface_ SetDefault Size api-13 - Set the default size of the OH_NativeImage.
- OH_
Consumer ⚠Surface_ SetDefault Usage api-13 - Set the default usage of the OH_NativeImage.
- OH_
Native ⚠Image_ Acquire Native Window - Acquire the OHNativeWindow for the OH_NativeImage.
- OH_
Native ⚠Image_ Acquire Native Window Buffer api-12 - Acquire an OHNativeWindowBuffer through an OH_NativeImage instance for content consumer.
- OH_
Native ⚠Image_ Attach Context - Attach the OH_NativeImage to Opengl ES context, and the Opengl ES texture is bound to the
- OH_
Native ⚠Image_ Create - Create a OH_NativeImage related to an Opengl ES texture and target.
- OH_
Native ⚠Image_ Destroy - Destroy the OH_NativeImage created by OH_NativeImage_Create, and the pointer to OH_NativeImage will be null after this operation.
- OH_
Native ⚠Image_ Detach Context - Detach the OH_NativeImage from the Opengl ES context.
- OH_
Native ⚠Image_ GetBuffer Matrix api-15 - Obtains the transform matrix that combines with crop rect.
- OH_
Native ⚠Image_ GetSurface Id api-11 - Return the native image’s surface id.
- OH_
Native ⚠Image_ GetTimestamp - Get the timestamp of the texture image set by the most recent call to OH_NativeImage_UpdateSurfaceImage.
- OH_
Native ⚠Image_ GetTransform Matrix Deprecated - Return the transform matrix of the texture image set by the most recent call to
- OH_
Native ⚠Image_ GetTransform Matrix V2 api-12 - Obtains the transform matrix of the texture image by producer transform type.
- OH_
Native ⚠Image_ Release Native Window Buffer api-12 - Release the OHNativeWindowBuffer to the buffer queue through an OH_NativeImage instance for reuse.
- OH_
Native ⚠Image_ SetDrop Buffer Mode api-17 - Set the rendering in drop buffer mode of the OH_NativeImage.
- OH_
Native ⚠Image_ SetOn Frame Available Listener api-11 - Set the frame available callback.
- OH_
Native ⚠Image_ Unset OnFrame Available Listener api-11 - Unset the frame available callback.
- OH_
Native ⚠Image_ Update Surface Image - Update the related Opengl ES texture with the OH_NativeImage acquired buffer.
Type Aliases§
- OH_
OnFrame Available api-11 - The callback function of frame available.