From fe4becbb191f8e397647eb206df614ca6ec333a7 Mon Sep 17 00:00:00 2001 From: maihd Date: Thu, 28 Mar 2024 14:17:19 +0700 Subject: [PATCH] docs: build_flags.md --- README.md | 1 + docs/build_flags.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 docs/build_flags.md diff --git a/README.md b/README.md index c9e6127..15a927e 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ so other languages you should use the libraries written specifily for thoses lan - Why Unlicense? Mostly source codes were re-written from The-Forge's VectorMath library, so I don't own the code. (I found the code with the same design with this library, but older: https://github.com/zauonlok/renderer/blob/master/renderer/core/maths.h) - Where the functions docs, and tutorials? WIP. +- Advance usages, configs, build flags docs? Find out in [build_flags](docs/build_flags.md). - More examples on some popular renderers (bgfx, The-Forge)? Learning. - I want to use it with Raylib? replace struct definition of VectorX with typedef and it will work, Matrix must be do more work. - More about performance? Not the fastest, but enough to use with small project. diff --git a/docs/build_flags.md b/docs/build_flags.md new file mode 100644 index 0000000..c2c991e --- /dev/null +++ b/docs/build_flags.md @@ -0,0 +1,14 @@ +# Build flags and config details +- `VECTORMATH_ENABLE_CLANG_EXT`: + - Compiler options: `-DVECTORMATH_ENABLE_CLANG_EXT` + - Use clang vector extensions, only work with clang compiler. + - Clang vector extensions support swizzle syntaxes. + +- `VECTORMATH_SIMD_ENABLE`: + - Compiler options: `-DVECTORMATH_SIMD_ENABLE` + - Prefer to use SIMD if available, autoconfig to use SSE or NEON based on target platform. + +- `VECTORMATH_USE_EXACT_PRECISION`: + - Compiler options: `-DVECTORMATH_USE_EXACT_PRECISION` + - Prefer good precision over fast math (currently use idSoftware FastInvSqrt) + - Planning to do some fast trigonometric with simd instructions