mirror of
https://github.com/openharmony/third_party_meshoptimizer.git
synced 2026-07-18 17:44:31 -04:00
merge master into master
增加相关文档,测试用例。Signed-off-by: wangshilin <wangshilin20@h-partners.com> Created-by: weixin_44878761 Commit-by: wangshilin Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) ### 二、建议测试周期和提测地址 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: ### 三、变更内容 * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) ### 四、研发自测点(自测哪些?冒烟用例全部自测?) 自测测试结论: ### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方) 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony-sig/third_party_meshoptimizer!1
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
# MIT LICENSE
|
||||
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("meshoptimizer_headers_config") {
|
||||
include_dirs = ["src"]
|
||||
}
|
||||
|
||||
ohos_shared_library("meshoptimizer") {
|
||||
sources = [
|
||||
"src/meshoptimizer.h",
|
||||
"src/allocator.cpp",
|
||||
"src/clusterizer.cpp",
|
||||
"src/indexcodec.cpp",
|
||||
"src/indexgenerator.cpp",
|
||||
"src/overdrawanalyzer.cpp",
|
||||
"src/overdrawoptimizer.cpp",
|
||||
"src/quantization.cpp",
|
||||
"src/simplifier.cpp",
|
||||
"src/spatialorder.cpp",
|
||||
"src/stripifier.cpp",
|
||||
"src/vcacheanalyzer.cpp",
|
||||
"src/vcacheoptimizer.cpp",
|
||||
"src/vertexcodec.cpp",
|
||||
"src/vertexfilter.cpp",
|
||||
"src/vfetchanalyzer.cpp",
|
||||
"src/vfetchanalyzer.cpp",
|
||||
]
|
||||
public_configs = [ ":meshoptimizer_headers_config" ]
|
||||
|
||||
part_name = "meshoptimizer"
|
||||
subsystem_name = "thirdparty"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
Uses meshoptimizer. Copyright (c) 2016-2025 Arseny Kapoulkine
|
||||
Sen the README file for the current license terms.
|
||||
This project is licensed under the MIT license.By downloading any component from this repository you acknowledge that you accept terms specified in the LICENSE file.
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
MIT LISENSE
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile>COPYING</licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<policyitem type="license" name="MIT" path=".*" desc="MIT LICENSE"/>
|
||||
<policyitem type="copyright" name="Arseny Kapoulkine" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Arseny Kapoulkine"/>
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="*.obj" desc="3D model file"/>
|
||||
<filteritem type="filename" name="*.glb" desc="3D model file"/>
|
||||
<filteritem type="filename" name="*.git-blame-ignore-revs" desc="Third-party open-source software does not require testing."/>
|
||||
<filteritem type="filepath" name="tools/.*" desc="Do not use the code in this folder."/>
|
||||
<filteritem type="filepath" name="testcase/.*" desc="Third-party open-source software does not require testing."/>
|
||||
<filteritem type="filepath" name="js/.*" desc="Do not use the code in this folder."/>
|
||||
<filteritem type="filepath" name="gltf/.*" desc="Do not use the code in this folder."/>
|
||||
<filteritem type="filepath" name="extern/.*" desc="Do not use the code in this folder."/>
|
||||
<filteritem type="filepath" name="demo/.*" desc="Do not use the code in this folder."/>
|
||||
<filteritem type="filepath" name="src/.*" desc="Third-party open-source software does not require testing."/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
</filefilter>
|
||||
|
||||
</filefilterlist>
|
||||
<licensematcherlist>
|
||||
</licensematcherlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
||||
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name": "meshoptimizer",
|
||||
"License": "MIT",
|
||||
"License File": "LICENSE",
|
||||
"Version Number": "v0.22",
|
||||
"Owner": "wangshilin20@h-partners.com",
|
||||
"Upstream URL": "https://github.com/zeux/meshoptimizer",
|
||||
"Description": "Meshoptimizer is an efficient mesh optimization library that reduces the storage size of 3D mesh data and enhances rendering performance through various techniques. It is mainly used in the fields of graphics and game development, especially when dealing with 3D models containing a large number of polygons. It can significantly reduce the rendering burden and improve operational efficiency."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,76 @@
|
||||
# meshoptimizer
|
||||
Mesh optimizer is an efficient mesh optimization library that reduces the storage size of 3D mesh data and improves rendering performance through various techniques. It is mainly used for optimizing 3D models (such as pixel silver optimization, vertex caching optimization, over drawing optimization, vertex acquisition optimization, vertex quantization, shadow indexing), especially when dealing with a large number of polygon 3D models, which can significantly reduce rendering burden and improve running efficiency.
|
||||
|
||||
## Use Cases of meshoptimizer
|
||||
Gltf (Graphics Library Transmission Format) is a royalty free specification aimed at improving the efficiency of application transmission and loading of 3D scenes and models.
|
||||
The introduction of meshoptimizer on OpenHarmony is mainly for decompressing the Ext_meshopt_compress extension format in gltf.
|
||||
|
||||
## Directory Structure
|
||||
```
|
||||
demo # demo file
|
||||
extern # third-party source code
|
||||
gltf # gltfpack is a tool that can automatically optimize gltf files, reducing download size and improving loading and rendering speed
|
||||
js # this folder contains JavaScript/WebAssembly modules that can be used to access some functions of the meshoptimizer library
|
||||
src # C++ source code directory of meshoptimizer containing decompression functions
|
||||
CMakeLists.txt # build description file
|
||||
LICENSE.md # license statement
|
||||
README.MD # software description
|
||||
```
|
||||
|
||||
|
||||
## The adaptation of meshoptimizer for OpenHarmony
|
||||
OpenHarmony only compiles the source code and header files under the src/ directory in the meshoptimizer repository. meshoptimizer is introduced into the thirdparty directory of OpenHarmony and compiled using the method of dependent components in OpenHarmony.
|
||||
|
||||
## Main Code Download
|
||||
```
|
||||
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
|
||||
repo sync -c
|
||||
repo forall -c 'git lfs pull'
|
||||
```
|
||||
|
||||
|
||||
## Depend on the modules in use.
|
||||
```
|
||||
deps = ["//third_party/meshoptimizer:meshoptimizer"]
|
||||
```
|
||||
|
||||
|
||||
## Preprocessing
|
||||
```
|
||||
./build/prebuilts_download.sh
|
||||
```
|
||||
|
||||
|
||||
## Compilation
|
||||
```
|
||||
./build.sh --product-name rk3568 --ccache
|
||||
```
|
||||
|
||||
|
||||
## Relevant References
|
||||
https://github.com/zeux/meshoptimizer
|
||||
|
||||
|
||||
## License
|
||||
This project is subject to the license described in LICENCE.
|
||||
|
||||
## Related warehouse
|
||||
meshoptimizer
|
||||
|
||||
##Usage in OpenHarmony
|
||||
###Object oriented
|
||||
Developers of system applications and 3D graphics engines.
|
||||
###Guidance and reference
|
||||
```
|
||||
deps = ["//third_party/meshoptimizer:meshoptimizer"]
|
||||
```
|
||||
Introduce this third-party library.
|
||||
```
|
||||
include "meshoptimizer.h"
|
||||
meshopt_decodeVertexBuffer();
|
||||
meshopt_decodeFilterOct();
|
||||
meshopt_decodeFilterQuat();
|
||||
meshopt_decodeFilterExp();
|
||||
meshopt_decodeIndexBuffer();
|
||||
```
|
||||
Introduce the meshoptimizer. h header file and use the corresponding functions. For specific instructions on the functions, please refer to: https://github.com/zeux/meshoptimizer
|
||||
@@ -0,0 +1,71 @@
|
||||
# meshoptimizer
|
||||
meshoptimizer 是一个高效的网格优化库,通过多种技术减少3D网格数据的存储大小,提升渲染性能。它主要用于对3D模型的优化(素银优化,顶点缓存优化,过度绘制优化,顶点获取优化,顶点量化,阴影索引),尤其是处理大量多边形的3D模型时,能够显著降低渲染负担,提高运行效率。
|
||||
|
||||
## meshoptimizer使用场景
|
||||
gltf(Graphics Library Transmission Format)是一种免版税的规范,旨在提高应用程序传输和加载3D场景及模型的效率。
|
||||
OpenHarmony上引入meshoptimizer,主要用于对gltf中Ext_meshopt_compress扩展格式的解压缩。
|
||||
|
||||
## 目录结构
|
||||
```
|
||||
demo # demo文件
|
||||
extern # 三方源代码
|
||||
gltf # gltfpack 是一款能够自动优化gltf文件的工具,减少下载大小并提升加载和渲染速度
|
||||
js # 此文件夹包含可用于访问meshoptimizer库部分功能的Javascript/WebAssembly模块
|
||||
src # meshoptimizer C++源代码目录包含解压缩功能
|
||||
CMakeLists.txt # 编译描述文件
|
||||
LICENSE.md # 版权说明
|
||||
README.MD # 软件说明
|
||||
```
|
||||
|
||||
## OpenHarmony对于meshoptimizer的适配
|
||||
OpenHarmony只编译使用meshoptimizer仓库中src/目录下的源代码和头文件。meshoptimizer引入openharmony的thirdparty目录下,使用OpenHarmony中依赖部件的方式进行编译。
|
||||
|
||||
## 主干代码下载
|
||||
```
|
||||
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
|
||||
repo sync -c
|
||||
repo forall -c 'git lfs pull'
|
||||
```
|
||||
|
||||
## 在使用的模块进行依赖
|
||||
```
|
||||
deps = ["//third_party/meshoptimizer:meshoptimizer"]
|
||||
```
|
||||
|
||||
## 预处理
|
||||
```
|
||||
./build/prebuilts_download.sh
|
||||
```
|
||||
|
||||
## 编译
|
||||
```
|
||||
./build.sh --product-name rk3568 --ccache
|
||||
```
|
||||
|
||||
## 相关参考
|
||||
https://github.com/zeux/meshoptimizer
|
||||
|
||||
## 许可证
|
||||
本项目遵从LICENCE中所描述的许可证
|
||||
|
||||
## 相关仓
|
||||
meshoptimizer
|
||||
|
||||
## OpenHarmony中的使用
|
||||
### 面向对象
|
||||
系统应用的开发者,3D图形引擎相关开发者。
|
||||
### 指导参考
|
||||
```
|
||||
deps = ["//third_party/meshoptimizer:meshoptimizer"]
|
||||
```
|
||||
引入该三方库。
|
||||
```
|
||||
include "meshoptimizer.h"
|
||||
|
||||
meshopt_decodeVertexBuffer();
|
||||
meshopt_decodeFilterOct();
|
||||
meshopt_decodeFilterQuat();
|
||||
meshopt_decodeFilterExp();
|
||||
meshopt_decodeIndexBuffer();
|
||||
```
|
||||
引入meshoptimizer.h头文件,使用相应的函数,函数具体指导参考:https://github.com/zeux/meshoptimizer
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@ohos/meshoptimizer",
|
||||
"description": "meshoptimizer",
|
||||
"version": "6.0",
|
||||
"license": "meshoptimizer license",
|
||||
"publishAs": "code-segment",
|
||||
"segment": {
|
||||
"desPath": "third_party/meshoptimizer"
|
||||
},
|
||||
"dirs": {},
|
||||
"scripts": {},
|
||||
"licensePath": "LICENSES",
|
||||
"readmePath": {
|
||||
"en": "README_en"
|
||||
},
|
||||
"component": {
|
||||
"name": "meshoptimizer",
|
||||
"subsystem": "thirdparty",
|
||||
"syscap": [],
|
||||
"features": [],
|
||||
"adapted_system_type": [
|
||||
"small",
|
||||
"mini",
|
||||
"standard"
|
||||
],
|
||||
"rom": "125KB",
|
||||
"ram": "",
|
||||
"deps": {
|
||||
"components": [],
|
||||
"third_party": []
|
||||
},
|
||||
"build": {
|
||||
"sub_component": [],
|
||||
"inner_kits": [
|
||||
{
|
||||
"type": "so",
|
||||
"name": "//third_party/meshoptimizer:meshoptimizer",
|
||||
"header": {
|
||||
"header_files": [],
|
||||
"header_base": "//third_party/meshoptimizer"
|
||||
}
|
||||
}],
|
||||
"test": []
|
||||
}
|
||||
}
|
||||
}
|
||||
+1965
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user