Skip to content

docs: clarify external buffer and image loading options - #162

Merged
spnda merged 3 commits into
spnda:mainfrom
snowyukitty:docs/external-data-loading
Oct 14, 2026
Merged

spnda merged 3 commits into
spnda:mainfrom
snowyukitty:docs/external-data-loading

Conversation

@snowyukitty

@snowyukitty snowyukitty commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The loading option comments do not explain which DataSource alternatives remain possible after parsing. This adds a practical buffer/image source table and updates both option comments to distinguish local files, embedded data, remote URIs, and custom allocation callbacks. It also explains missing-file errors, buffer-view images, and the difference between reading image bytes and decoding pixels.

Three parser tests cover the independence of the two options, embedded and remote sources with default/custom allocations, and missing local files. They intentionally pass on the unchanged base parser: this documents existing behavior rather than changing resource loading.

The review follow-up states that buffer data URIs are decoded independently of the loading option, spells out both meshopt extension names, and checks the buffer-view image variant before accessing it.

Validation on Linux with GCC 14.2:

  • Native fastgltf_tests "[loading-options]": 3 cases / 86 assertions passed.
  • Existing base64, URI, box, expected, optional, vector, math, utility, GLB and embedded-allocation tests: 49 cases / 1153 assertions passed.
  • Doxygen 1.9.8 and Sphinx 7.4.7 HTML build succeeded, with no additional Sphinx warnings compared with the base (95 existing warnings).
  • git diff --check passed.

Only the required sample assets were downloaded for these checks; the complete sample-asset suite was not run.

The GCC 15 and Clang 22 C++ modules jobs also fail on the unchanged upstream base with the same compiler diagnostics; the module workflow and build configuration are unchanged by this PR.

Fixes #146.

@spnda spnda left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is a great change, thank you very much. The documentation definitely needs some additional work and attention from myself. I just have a couple nits. Also, great usage of Catch2 I had no idea you could structure the control flow like that, very cool.

Comment thread include/fastgltf/parser.hpp Resolved
Comment thread docs/options.rst Resolved
Comment thread tests/basic_test.cpp Resolved
@spnda spnda added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 13, 2026
@snowyukitty

Copy link
Copy Markdown
Contributor Author

Addressed all three points in a4daf78:

  • LoadExternalBuffers now explicitly states that data URIs are decoded independently of the option.
  • The options page names both EXT_meshopt_compression and KHR_meshopt_compression.
  • The embedded-source test checks sources::BufferView before accessing it with std::get.

On the updated head, the three loading-option cases pass with 86 assertions, and 49 existing cases pass with 1,153 assertions. The documentation build also passes with no added Sphinx warnings. The full sample-asset suite was not run. The new GitHub workflows currently show action_required with no jobs started.

@spnda spnda removed the enhancement New feature or request label Oct 14, 2026
@spnda
spnda merged commit 72511e6 into spnda:main Oct 14, 2026
14 of 16 checks passed
@spnda

spnda commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Thanks. Also, the commits have been back ported as 372adcb and 38cdfc5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What do the options LoadExternalBuffers and LoadExternalImages actually guarantee?

2 participants