Declares OpenGTX APIs used for both the OpenGL ES and Vulkan graphics APIs.
Library: libopengtx.so
System capability: SystemCapability.GraphicsGame.RenderAccelerate
Start version: 5.0.0(12)
Related module: GraphicsAccelerate
| Name | Description |
|---|---|
| struct OpenGTX_ConfigDescription | Describes the OpenGTX attribute settings. |
| struct OpenGTX_GameSceneInfo | Describes the game scene information. This struct is passed by a game app after obtaining the scene information. |
| struct OpenGTX_FrameRenderInfo | Describes the frame rendering information. This struct is passed by a game app after obtaining the frame attributes. |
| struct OpenGTX_NetworkInfo | Describes the current device network information. This struct is passed by a game app after obtaining the network information. |
| struct OpenGTX_ResolutionValue | Describes the resolution of a game app. |
| struct OpenGTX_Vector3 | Describes an OpenGTX 3D vector. |
| struct OpenGTX_NetworkLatency | Describes the current device network latency information. This struct is passed by a game app after obtaining the network latency information. |
| Name | Description |
|---|---|
| typedef enum OpenGTX_ErrorCode OpenGTX_ErrorCode | Describes the error codes of OpenGTX API calls. |
| typedef enum OpenGTX_LTPO_Mode OpenGTX_LTPO_Mode | Describes the OpenGTX_LTPO modes for controlling the game frame rate. |
| typedef enum OpenGTX_EngineType OpenGTX_EngineType | Describes the underlying game engine types used by game apps. |
| typedef enum OpenGTX_GameType OpenGTX_GameType | Describes the game types. |
| typedef enum OpenGTX_SceneID OpenGTX_SceneID | Describes the OpenGTX game scene types. |
| typedef enum OpenGTX_PictureQualityMaxLevel OpenGTX_PictureQualityMaxLevel | Describes the game app image quality levels. |
| typedef enum OpenGTX_TempLevel OpenGTX_TempLevel | Describes the device temperature levels. |
| typedef struct OpenGTX_Context OpenGTX_Context | Describes the OpenGTX context. |
| typedef struct OpenGTX_ConfigDescription OpenGTX_ConfigDescription | Describes the OpenGTX attribute settings. |
| typedef struct OpenGTX_GameSceneInfo OpenGTX_GameSceneInfo | Describes the game scene information. This struct is passed by a game app after obtaining the scene information. |
| typedef struct OpenGTX_FrameRenderInfo OpenGTX_FrameRenderInfo | Describes the frame rendering information. This struct is passed by a game app after obtaining the frame attributes. |
| typedef struct OpenGTX_NetworkInfo OpenGTX_NetworkInfo | Describes the current device network information. This struct is passed by a game app after obtaining the network information. |
| typedef struct OpenGTX_ResolutionValue OpenGTX_ResolutionValue | Describes the resolution of a game app. |
| typedef struct OpenGTX_Vector3 OpenGTX_Vector3 | Describes an OpenGTX 3D vector. |
| typedef struct OpenGTX_NetworkLatency OpenGTX_NetworkLatency | Describes the current device network latency information. This struct is passed by a game app after obtaining the network latency information. |
| typedef void(* OpenGTX_DeviceInfoCallback) (OpenGTX_TempLevel) | Callback for device temperature information. |
| Name | Description |
|---|---|
| OPENGTX_SUCCESS = 0, OPENGTX_INVALID_PARAMETER = 401, OPENGTX_CONTEXT_NOT_CONFIG = 1009502001, OPENGTX_CONTEXT_NOT_ACTIVE = 1009502002 } | Describes the error codes of OpenGTX API calls. |
| SCENE_MODE = 0x0001, TOUCH_MODE = 0x0010, ADAPTIVE_MODE = 0x0100 } | Describes the OpenGTX_LTPO modes for controlling the game frame rate. |
| UNITY = 1, UNREAL = 2, MESSIAH = 3, COCOS = 4, OTHERS_ENGINE = 100 } | Describes the underlying game engine types used by game apps. |
| MOBA = 1, RPG = 2, FPS = 3, RAC = 4, OTHERS_TYPE = 100 } | Describes the game types. |
| LOGIN = 1, GAME_INTERFACE = 2, LOADING = 3, PLAYING = 4, SPECTATOR = 5, DEATH = 6, HEAVY_LOAD = 7, OTHERS_SCENE = 100 } | Describes the OpenGTX game scene types. |
OpenGTX_PictureQualityMaxLevel { SD = 1, HD = 2, FHD = 3, QHD = 4, UHD = 5 } | Describes the game app image quality levels. |
| TEMP_LEVEL1 = 1, TEMP_LEVEL2 = 2, TEMP_LEVEL3 = 3, TEMP_LEVEL4 = 4, TEMP_LEVEL5 = 5, TEMP_LEVEL6 = 6 } | Describes the device temperature levels. |
| Name | Description |
|---|---|
| OpenGTX_Context* HMS_OpenGTX_CreateContext(OpenGTX_DeviceInfoCallback deviceInfoCallback) | Creates an OpenGTX context instance. Each time this API is successfully called, an OpenGTX_Context object is created and a pointer to the OpenGTX_Context object is returned. |
| OpenGTX_ErrorCode HMS_OpenGTX_Activate(OpenGTX_Context* context) | Activates an OpenGTX context instance. Before using an OpenGTX context instance, you need to activate it. |
| OpenGTX_ErrorCode HMS_OpenGTX_Deactivate(OpenGTX_Context* context) | Deactivates an OpenGTX context instance. To activate the instance again, call the HMS_OpenGTX_Activate API. |
| OpenGTX_ErrorCode HMS_OpenGTX_SetConfiguration(OpenGTX_Context* context, const OpenGTX_ConfigDescription* config) | Initializes an OpenGTX context instance and sets the OpenGTX context instance attributes. |
| OpenGTX_ErrorCode HMS_OpenGTX_DispatchFrameRenderInfo(OpenGTX_Context* context, const OpenGTX_FrameRenderInfo* frameRenderInfo) | Sets the frame rendering information required for OpenGTX running. The information needs to be updated after each change to a frame. |
| OpenGTX_ErrorCode HMS_OpenGTX_DispatchGameSceneInfo(OpenGTX_Context* context, const OpenGTX_GameSceneInfo* gameSceneInfo) | Sets the game scene information required for OpenGTX running. |
| OpenGTX_ErrorCode HMS_OpenGTX_DispatchNetworkInfo(OpenGTX_Context* context, const OpenGTX_NetworkInfo* networkInfo) | Sets the network latency information required for OpenGTX running. |
| OpenGTX_ErrorCode HMS_OpenGTX_DestroyContext(OpenGTX_Context** context) | Destroys an OpenGTX context instance and releases memory resources. |