Skip to content

Commit

Permalink
MeshOptimizerSceneConverter: update notes for recently released 0.18.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Aug 13, 2022
1 parent 2891510 commit 408c973
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ simplifyTargetIndexCountThreshold=1.0
simplifyTargetError=1.0e-2
# Do not move vertices that are located on the topological border (vertices on
# triangle edges that don't have a paired triangle). Useful for simplifying
# portions of the larger mesh. Available since
# https://github.com/zeux/meshoptimizer/pull/432 (to be released as 0.18),
# ignored on older versions.
# portions of the larger mesh. Available since 0.18, ignored on older versions.
simplifyLockBorder=false

# Used by mesh efficiency analyzers when verbose output is enabled. Defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,13 @@ bool MeshOptimizerSceneConverter::doConvertInPlace(MeshData& mesh) {

namespace {

/* As of https://github.com/zeux/meshoptimizer/pull/432 (to be released as
0.18), the meshopt_simplify() has a new second-to-last options argument,
this pair of templates adapts to that -- by either passing the function
pointer through unchanged or by wrapping it in a lambda that ignores the
options argument (and the result_error on versions before 0.16) */
/** @todo use an ifdef instead once we can rely on MESHOPTIMIZER_VERSION */
/* As of version 0.18 (https://github.com/zeux/meshoptimizer/pull/432), the
meshopt_simplify() has a new second-to-last options argument, this pair of
templates adapts to that -- by either passing the function pointer through
unchanged or by wrapping it in a lambda that ignores the options argument
(and the result_error on versions before 0.16) */
/** @todo switch to #if MESHOPTIMIZER_VERSION >= 180 once enough time passes
(released on 2022-08-01) */
template<std::size_t(*F)(UnsignedInt*, const UnsignedInt*, std::size_t, const Float*, std::size_t, std::size_t, std::size_t, Float
#if MESHOPTIMIZER_VERSION >= 160
, Float*
Expand Down Expand Up @@ -394,8 +395,8 @@ Containers::Optional<MeshData> MeshOptimizerSceneConverter::doConvert(const Mesh
targetIndexCount,
targetError,
configuration().value<bool>("simplifyLockBorder") ?
/** @todo use a real value once we can rely on
MESHOPTIMIZER_VERSION */
/** @todo switch to #if MESHOPTIMIZER_VERSION >= 180 once
enough time passes (released on 2022-08-01) */
1 /*meshopt_SimplifyLockBorder*/ : 0,
nullptr);
}
Expand Down

0 comments on commit 408c973

Please sign in to comment.