Closed forenoonwatch closed 1 year ago
- In Release mode on MSVC the "getAccessorElement" test fails sometimes (!) with sparse accessors. With a debugger I noticed the values are definitely wrong but I couldn't tell you why.
REQUIRE(checkValues[i] == fastgltf::getAccessorElementglm::vec3(*asset, secondAccessor, i)) with expansion: {?} == {?}
I've been able to replicate this in my MinGW release (intermittently). Trying to see if I can actually figure out what's causing it.
This PR adds fastgltf_tools.hpp, a header containing several utility functions such as
getAccessorElement
,iterateAccessor
, andfillTargetFromAccessor
, theElementTraits<T>
struct for matching metadata about the desired type, and theDefaultBufferDataAdapter
, a minimal default implementation of theBufferDataAdapter
pattern which allows the accessor indexing functions to resolve used buffer memory.Currently this PR lacks support for compressed buffer views from EXT_meshopt_compression.