drawing_gpu_context.h
Overview
This file declares the functions related to the GPU context in the drawing module.
File to include: <native_drawing/drawing_gpu_context.h>
Library: libnative_drawing.so
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Related module: Drawing
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| OH_Drawing_GpuContextOptions | OH_Drawing_GpuContextOptions | Describes the options about the GPU context. |
Functions
| Name | Description |
|---|---|
| OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions) | Creates an OH_Drawing_GpuContext object that uses OpenGL as the backend interface. |
| OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(void) | Creates an OH_Drawing_GpuContext object, for which the backend type depends on the device. |
| void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext* gpuContext) | Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object. |
Function Description
OH_Drawing_GpuContextCreateFromGL()
OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions)
Description
Creates an OH_Drawing_GpuContext object that uses OpenGL as the backend interface.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Deprecated from: 18
Substitute: OH_Drawing_GpuContextCreate
Parameters
| Name | Description |
|---|---|
| OH_Drawing_GpuContextOptions gpuContextOptions | GPU context options, which is OH_Drawing_GpuContextOptions. |
Returns
| Type | Description |
|---|---|
| OH_Drawing_GpuContext* | Returns the pointer to the OH_Drawing_GpuContext object created. |
OH_Drawing_GpuContextCreate()
OH_Drawing_GpuContext* OH_Drawing_GpuContextCreate(void)
Description
Creates an OH_Drawing_GpuContext object, for which the backend type depends on the device.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 16
Returns
| Type | Description |
|---|---|
| OH_Drawing_GpuContext* | Returns the pointer to the OH_Drawing_GpuContext object created. |
OH_Drawing_GpuContextDestroy()
void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext* gpuContext)
Description
Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Parameters
| Name | Description |
|---|---|
| OH_Drawing_GpuContext* gpuContext | Pointer to an OH_Drawing_GpuContext object. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-drawing-nativepixelmap-
openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange
openharmony 鸿蒙 capi-drawing-oh-drawing-brush
openharmony 鸿蒙 capi-drawing-oh-drawing-image-info
openharmony 鸿蒙 capi-drawing-text-linetypography-h
openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage
openharmony 鸿蒙 capi-drawing-typeface-h
openharmony 鸿蒙 capi-drawing-brush-h