Since CMake supports manifest files as sources, it's a little easier to
specify UTF-8 as the ANSI encoding via that; this is embedded into .exe
and is used for command line arguments as well so the rest of the code
just works.
This is a stub that will be expanded to provide a demo of Nanite-like
(hierarchical clustered level of detail) processing. This is necessary
both to serve as an example of how to implement it using all best
practices as well as a testing harness; right now meshoptimizer has
enough functionality to implement *a* pipeline, but for best performance
currently some algorithms need to be swapped out. Long term the goal is
for this to be close to optimal while using just meshopt_ functions.
- Move meshloader.cpp to gltf/parselib.cpp to make it easier to
customize the build for gltfpack
- Remove cgltf from tools/meshloader (now tools/objloader) to make
non-gltfpack builds a little faster
- Fix vcachetuner Makefile build setup
meshopt_quantizeFloat and meshopt_quantizeHalf are moved to the new
file. These are larger (esp. float->half), not as commonly used as
unorm/snorm, don't benefit as much from inlining as it's more rare that
they are used with constant arguments in perf-sensitive context, and
also not used anywhere inside meshoptimizer itself, which means we still
get to keep the independence between different translation units (we'll
need to be careful with this in the future...).
A new file makes for a convenient place to add more quantization
utilities in the future as well.
These are used in gltfpack, which doesn't see a noticeable perf
degradation on geometry-heavy meshes that use quantizeFloat.
We now enable warnings as errors in CI CMake builds only using a new
MESHOPT_WERROR option; this ensures that while configurations tested in
CI are warning-free, meshoptimizer can be used on an untested compiler
version without errors.
For simplicity, Makefile builds for now keep -Werror unconditionally
since these would mostly be used during meshoptimizer development.
The _mm_undefined_si128() AVX-512 intrinsics on GCC produces an
"uninitialized variable" warning (which is, well, what is it intended to
actually do), and that makes the code not compile even though there's no
actual error. I discovered this only because I use -march=native to
build system packages and recently upgraded to an AVX-512-equipped
hardware.
I assume this is just a temporary compiler wart that will eventually get
fixed, so there's no point in trying to silence that warning from
within meshoptimizer.
This is going to make Basis integration easier; there's no real reason
to keep using C++98 for gltfpack. Note that meshoptimizer continues to
use C++98 and that is unlikely to change.
This change replaces the old custom version of miniz with sdefl. sdefl
has less code, doesn't require modifications and performs about as well.
New versions of sdefl are available on https://github.com/vurtun/lib
* Missing include for strstr()
* With -Wall -Wextra -Werror, unreferenced function arguments are
treated as errors as well, made them unnamed
* Fix linking to non-bundled GLFW (the target to link to is glfw in
both cases, so just use that)
This still fails to link on Linux/macOS due to the GL library not being
linked.
On systems that have GLFW installed the MESHOPT_BUILD_TOOLS option would
otherwise build the internal lodviewer tool as well, which might not be
desirable.
This allows overriding MESHOPT_ options from the parent CMakeLists.txt
when that uses add_subdirectory.
Also refactor CMake version checks to use NOT LESS - GREATER_EQUAL is
only available in CMake 3.7+ but NOT LESS should work everywhere and is
more concise.
This adds a folder that we can put all gltfpack-related sources to.
The name was chosen over gltfpack to avoid conflicts with gltfpack
executable name since this doesn't change the build structure for now.