What's Changed
- Add: GltfFileStream and rewritten GltfDataBuffer (@spnda, #49)
- The interface now uses factory constructors, and allows for custom methods for providing the glTF. See documentation for more details.
auto jsonData = fastgltf::GltfDataBuffer::FromPath("./asset.gltf"); if (jsonData.error() != fastgltf::Error::None) return false; // Parse the asset with jsonData.get()
- There is also a
GltfFileStream
class which wraps astd::ifstream
which can potentially increase memory loading speeds. - This allows support for memory mapped files on platforms which provide this functionality using
MappedGltfFile
.
- The interface now uses factory constructors, and allows for custom methods for providing the glTF. See documentation for more details.
- Add: Integrated math library (@spnda)
- All colors and the node transform properties now use vectors/matrices from the built-in library. This library only covers basic maths, and just about everything one needs to work with glTF. There will be additions in the near future for adding more functionality. I've tried not to include too much bloat, but the header might still be a little template-heavy.
- This change does not require any changes to old code, since the types are essentially just wrappers around
std::array
. And code such asglm::make_vec3(pTranslation->data())
will continue to work as expected.
- Add: Support C++20 modules (@stripe2933, @spnda, #61)
- Initial revision of a fastgltf.ixx named module, which is accessible through CMake with the
fastgltf::module
target. This feature is still somewhat experimental, so please report any issues you find.
- Initial revision of a fastgltf.ixx named module, which is accessible through CMake with the
- Add: Load external files from an APK (@DethRaid, @spnda, #15)
- The interface for letting fastgltf interact with Android assets has fully changed. See documentation for more details.
- Add: Documentation on how to use specific features
- The 'Guides' subsection now includes short documentation about various features which might not be directly obvious how to use. This also covers the recent changes to
GltfDataBuffer
and the Android interface.
- The 'Guides' subsection now includes short documentation about various features which might not be directly obvious how to use. This also covers the recent changes to
- Add: Support for
KHR_accessor_float64
- Add: Support for std::float{32,64}_t with accessor tools
- Add: Predefined element traits for DirectXMath types
- Change: Only pass buffer view index to data adapter in tools (de4af98)
- The
BufferDataAdapter
interface now takes a buffer view index instead of theBuffer
reference. Older custom functors will need upgrading.
- The
- Change: Reduce ComponentType to 16 bits & AccessorType to 8 bits.
- Change: Use
std::invoke
in the tools header to be compatible with more function wrappers. - Change: Make Buffer data
std::byte
instead ofstd::uint8_t
- Fix: The
EXT_meshopt_compression
wasn't parsed correctly.- The test suite around extensions has been expanded to cover more edge cases, and bugs have been fixed accordingly.
- Various fixes and improvements to the Exporter interface
- Fix #51: Normalize resource paths & always use forward slashes
- Fix #55: Cache positionCount & use correct buffer size
- Fix #54: Use correct field name for primitive topology
- Fix #53: Let FileExporter create target directories
- Fix #52: Use const references to GLB buffer sources
- Fix: Typo in wrapT field name (@Cyphall, #56)
- Fix: Bad chunk padding for GLB export (@Cyphall, #57)
- Add: Animation support to Exporter (@Deweh, #64)
- Fix: Guard usages of throw (@apache-hb, #50)
- Fix: Accessor's component type is forced (@Razakhel, #59)
- Fix: Validate UTF-8 for exported JSON strings
- Fix: Always use exceptionless
std::filesystem
API - Fix: Always write/read GLB data in little-endian
- Fix many different compiler and clang-tidy warnings
New Contributors
- @apache-hb made their first contribution in #50
- @Cyphall made their first contribution in #56
- @Razakhel made their first contribution in #59
- @stripe2933 made their first contribution in #61
Full Changelog: v0.7.1...v0.8.0