README_en.md
1# AGP Engine
2
3## Introduction
4The Ark Graphics Platform (AGP) engine is a cross-platform, high-performance real-time 3D engine that is easy to use, high-quality, and scalable. The engine is designed with an advanced Entity-Component-System (ECS) architecture and is modularly encapsulated (such as material definitions, post-processing effects, etc.), providing developers with a flexible and easy-to-use development kit. The AGP engine supports the Opengl ES/Vulkan backend to reduce developers' dependence on hardware resources.
5
6The main structure of the AGP engine is shown in the following figure:
7
8
9
10The layering of the OpenHarmony 3D graphics stack is described as follows:
11
12• Interface layer: provides graphical native API capabilities and ECS component systems.
13
14• Engine layer
15
16| Module | Competency description |
17|------------------------|--------------------------------------------------------------------------------------------|
18| Model parsing | Provides the ability to parse GLTF models. |
19| Material Definitions | Definitions for materials such as PBR (Physically Based Rendering) are provided. |
20| animation | Provides animation engine-related capabilities such as rigid bodies, bones, etc. |
21| Lighting & Shadows & Reflections | Provide directional light, point light, spot light source and other light sources; Algorithms such as PCF (Hard Shadow-Based Anti-Aliasing Algorithm) are available. |
22| Post-processing effects | It mainly completes post-processing effects such as ToneMapping, Bloom, HDR (High Dynamic Range Imaging), FXAA (Fast Approximate Anti-Aliasing), and Blur. |
23| Plug-in system | Provides the ability to load various plugins and develop new features with plugins. |
24| resource management | This module provides resource management capabilities, including memory management, thread management, and GPU resource management. |
25| System abstraction | It mainly includes file system, window system, debugging system, etc. |
26
27• Graphical backend: OpenGL ES, Vulkan backend supported.
28
29## Directory Structure
30
31```
32foundation/graphic/graphic_3d/
33├── 3d_widget_adapter # Adapt to the ArkUI interface code
34├── lume # Engine core code
35│ ├── Lume_3D # ECS framework, 3D model analysis, and 3D rendering basic capabilities
36│ ├── LumeBase # Basic data types, math libraries
37│ ├── LumeEngine # Resource management, thread management, cross-platform, plug-in system
38│ └── LumeRender # Engine backend, render pipeline
39│ └── LumeBinaryCompile # Engine shader compilation
40```
41## Compilation and Building
42Through GN compilation, the lib3dWidgetAdapter.z.so, libAGPDLL.z.so, libPluginAGP3D.z.so, and libPluginAGPRender.z.so are generated in the folder of the corresponding product in the out directory.
43```
44hb build graphic_3d
45```
46## Description
47AGP Engine As a component of ArkUI, it provides the 3D drawing capability of the system.
48### Usage
49For more information, please refer to the use of other components in ArkUI. The AGP engine mainly provides 3D painting capabilities, including engine loading, custom lighting, camera, and texture capabilities, for developers to customize 3D models.
50## Repositories Involved
51- [**graphic_graphic_2d**](https://gitee.com/abbuu_openharmony/graphic_graphic_2d)
52- [arkui_ace_engine](https://gitee.com/openharmony/arkui_ace_engine)
53- [third_party_egl](https://gitee.com/openharmony/third_party_egl)
54- [third_party_opengles](https://gitee.com/openharmony/third_party_opengles)
55- [third_party_skia](https://gitee.com/openharmony/third_party_skia)
56