v0.9.0
版本发布时间: 2023-05-02 06:01:20
recp/cglm最新发布版本:v0.9.4(2024-04-01 23:10:19)
🚀 WASM 123 SIMD Support
Now we have WASM 128 SIMD support ( many thanks to @myfreeer ).
Compiling
Currently the tests can be cross-compiled to wasi using clang and wasi-sdk with cmake arguments below:
-DCMAKE_C_FLAGS="-msimd128"
-DCMAKE_TOOLCHAIN_FILE=/path/to/wasi-sdk-19.0/share/cmake/wasi-sdk.cmake
-DWASI_SDK_PREFIX=/path/to/wasi-sdk-19.0
-DCGLM_USE_TEST=ON
Where /path/to/wasi-sdk-19.0/
is the path to extracted wasi sdk.
🚀 Struct API Namespace Configuration
Now we can omit or change namespace of struct api which was ( and still as default ) glms_
. We can omit the namespace completely to use like mat4_mul(mat4_mul(m1, m2), m3)
... or option to use like mat4s_mul(mat4s_mul(m1, m2), m3)
...
This makes things more flexible & readable for struct api.
now we can omit glms_ like:
/* previous / default */
return glms_vec3_normalized(glms_vec3_cross(a, b));
/* this must be defined before cglm inc especially common.h */
#define CGLM_OMIT_NS_FROM_STRUCT_API /* or define at compiler settings */
/* new!! */
return vec3_normalized(vec3_cross(a, b));
/* if CGLM_STRUCT_API_NAME_SUFFIX is defined as `s` */
return vec3s_normalized(vec3s_cross(a, b));
new options:
-
CGLM_OMIT_NS_FROM_STRUCT_API
, omits CGLM_STRUCT_API_NS (glms_) namespace completely if there is sub namespace e.g mat4_, vec4_ ... DEFAULT is not defined -
CGLM_STRUCT_API_NS
: define name space for struct api, DEFAULT isglms
-
CGLM_STRUCT_API_NAME_SUFFIX
: define name suffix, DEFAULT is empty e.gdefining it as #define CGLM_STRUCT_API_NAME_SUFFIX s
will adds
suffix tomat4_mul -> mat4s_mul
🛠️ Bugfixes and Improvements:
- https://github.com/recp/cglm/pull/279: Check for builtin before using it ( thanks to @NeRdTheNed )
- https://github.com/recp/cglm/pull/280: fix building ARM NEON on windows & msvc ( thanks to @gottfriedleibniz )
- https://github.com/recp/cglm/pull/286: Wasm simd128 support ( thanks to @myfreeer also @kzhsw, @gottfriedleibniz )
- https://github.com/recp/cglm/pull/290: provide option to omit or configure struct api namespace
-
https://github.com/recp/cglm/pull/291: simd, sse: use 0x80000000 insteaf of -0.f to fix
/fp:fast
on msvc ( thanks to @gottfriedleibniz, @deadwanderer ) see https://github.com/recp/cglm/issues/289 - https://github.com/recp/cglm/pull/292: wasm: replace usage of -0.f to 0x80000000 ( thanks to @myfreeer )
- utility to print selected simd path
- fix building tests
- fix struct api calls
- update documentations ( thanks to @ransel117 @krishna2803 )
- and some improvements may not listed here
❤️ Sponsorship: Consider become a sponsor for cglm
Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:
https://github.com/sponsors/recp https://opencollective.com/cglm#backer https://patreon.com/recp