Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ vertex fetch optimization, simplification, meshlets, spatial ordering, the
vertex, index and meshlet codecs — is vendored byte for byte from the 1.3
release and built with the package; nothing else is linked.

The library is built with `-ffp-contract=off` and without fast math, so the
same input gives the same output bit for bit on every platform: with the
platform's own default arm64 fuses a multiply and an add into one rounding
and the meshlets of a scattered 48 × 48 sheet differ from x86-64's (from
1.3.1; 1.3 kept the platform's default).

## Modules

- `import mcpplibs.mwrap.meshoptimizer;`: the whole API (118 names: 9 types, 20 enumerators, 89 functions), re-exporting the one below
Expand All @@ -27,7 +33,7 @@ release and built with the package; nothing else is linked.
## Getting started

```sh
mcpp new lod --template mcpplibs.mwrap.meshoptimizer@1.3
mcpp new lod --template mcpplibs.mwrap.meshoptimizer@1.3.1
cd lod
mcpp run
```
Expand All @@ -37,7 +43,7 @@ and simplifies it to a tenth of its triangles.

```toml
[dependencies]
mcpplibs.mwrap.meshoptimizer = "1.3"
mcpplibs.mwrap.meshoptimizer = "1.3.1"
```

```cpp
Expand Down
8 changes: 6 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
简化、meshlet、空间排序、顶点/索引/meshlet 编解码——逐字节取自 1.3 发布包并随本包
构建,不链接其他东西。

库以 `-ffp-contract=off`、不开 fast math 编译,同样的输入在每个平台上逐位得到同样的
输出:按平台默认,arm64 会把乘与加合成一次舍入,打乱的 48 × 48 网格得到的 meshlet
与 x86-64 不同(1.3.1 起;1.3 用的是平台默认)。

## Modules

- `import mcpplibs.mwrap.meshoptimizer;`:全部 API(118 个名字:9 个类型、20 个枚举值、89 个函数),并再导出下面这个
Expand All @@ -25,7 +29,7 @@
## 快速开始

```sh
mcpp new lod --template mcpplibs.mwrap.meshoptimizer@1.3
mcpp new lod --template mcpplibs.mwrap.meshoptimizer@1.3.1
cd lod
mcpp run
```
Expand All @@ -34,7 +38,7 @@ mcpp run

```toml
[dependencies]
mcpplibs.mwrap.meshoptimizer = "1.3"
mcpplibs.mwrap.meshoptimizer = "1.3.1"
```

```cpp
Expand Down
6 changes: 5 additions & 1 deletion mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[package]
namespace = "mcpplibs.mwrap"
name = "meshoptimizer"
version = "1.3"
version = "1.3.1"
description = "meshoptimizer 1.3 C++ modules for mcpp (import mcpplibs.mwrap.meshoptimizer;): mesh indexing, vertex cache / overdraw / fetch optimization, simplification, meshlets, and the vertex / index codecs"
license = "Apache-2.0"
authors = ["mcpp-community"]
Expand All @@ -17,6 +17,10 @@ kind = "lib"
# (upstream/documents.json: the release tarball, each file's checksum).
sources = ["src/*.cppm", "upstream/meshoptimizer/src/*.cpp"]
include_dirs = ["upstream/meshoptimizer/src"]
# Every platform makes the same meshlets, clusters and simplifications: the
# compiler fuses no multiply and add into one rounding (arm64's default does,
# x86-64's cannot without FMA), so no float decision differs by platform.
cxxflags = ["-ffp-contract=off", "-fno-fast-math"]

[dev-dependencies]
compat.gtest = "1.15.2"
Expand Down
Loading