Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix images not being saved due to missing filesystem callbacks #491

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

ptc-tgamper
Copy link
Contributor

tiny_gltf.h - explicitly pass filesystem callbacks to image related functions
tester.cc - add respective test case, fix image uri test case

tiny_gltf.h - explicitly pass filesystem callbacks to image related functions
tester.cc - add respective test case, fix image uri test case
@syoyo
Copy link
Owner

syoyo commented Jun 25, 2024

Thanks!

This PR solves the issue as you mentioned: #473
And since it breaks FS API, I need to be a bit carefully on merging this PR.

Just want to confirm: The difference is only adding FSCallback to FS Writer API? No other changes to FS API?

@ptc-tgamper
Copy link
Contributor Author

No other changes. Just directly passing the FSCallbacks through. Now the user pointer is actually the user pointer one would expect in all the callbacks.

tiny_gltf.h Outdated Show resolved Hide resolved
@ptc-tgamper
Copy link
Contributor Author

@tdapper could you give this branch a try?

@DanielLorenzLaubwerk
Copy link

I can confirm that the small test case does not crash anymore. I am going to test it in our original context now.

@DanielLorenzLaubwerk
Copy link

It also works in our original context.
Many thanks.

Support image as_is flag in loading and saving
@syoyo
Copy link
Owner

syoyo commented Jun 28, 2024

@ptc-tgamper Code is now OK(reviewed & CI test passes). I think its ready to merge. Do you have any further commits planned?

@ptc-tgamper
Copy link
Contributor Author

Not at the moment. Please merge, as this gets memory consumption down by an order of magnitude for our use case.

@syoyo syoyo merged commit 8a269aa into syoyo:release Jun 28, 2024
8 checks passed
@syoyo
Copy link
Owner

syoyo commented Jun 28, 2024

@ptc-tgamper Thanks! Merged!

@syoyo
Copy link
Owner

syoyo commented Jun 28, 2024

Created new release FYI: https://github.com/syoyo/tinygltf/releases/tag/v2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants