Commit Graph

943 Commits

Author SHA1 Message Date
Syoyo Fujita
753576f817 Merge pull request #415 from louwaque/release
Fix serialization of AnimationChannel::target_node when it is zero
v2.8.7
2023-04-19 05:17:06 +09:00
Loïc Escales
578c518fd0 Fix serialization of AnimationChannel::target_node when it is zero 2023-04-18 21:03:39 +02:00
Syoyo Fujita
e2ade37808 Merge pull request #412 from agnat/add_char_pointer_ctor
Fix #411 by adding a Value(const char *) constructor.
v2.8.6
2023-04-10 19:11:35 +09:00
Syoyo Fujita
8c8f9bc243 Deprecate ubuntu-18.04 image and update CI build configuration. 2023-04-10 18:51:29 +09:00
David Siegel
1a31f42a98 Fix #411 by adding a Value(const char *) constructor.
Avoid implicit conversion of pointers to bool. Closes #411.
2023-04-08 23:44:53 +02:00
Syoyo Fujita
0a9ba62baa Merge pull request #409 from NeilBickford-NV/nbickford/update-stb-image
Updates stb_image and stb_image_write
v2.8.5
2023-03-30 18:13:12 +09:00
Neil Bickford
3a11ec3bbc stb_image: Apply https://github.com/nothings/stb/pull/1443 2023-03-29 12:00:24 -07:00
Neil Bickford
cc18aed49d stb_image: Apply https://github.com/nothings/stb/pull/1454 2023-03-29 11:57:27 -07:00
Neil Bickford
7f6bcba697 Update stb_image and stb_image_write to latest nothings/stb dev branch: 9f1776a36d 2023-03-29 11:56:13 -07:00
Syoyo Fujita
c0967f718d Merge pull request #408 from marco-langer/feature/ostream_error_handling
Added error checking to ostream writing
v.2.8.4
2023-03-13 21:18:02 +09:00
Marco Langer
3add08b761 Added error handling to ostream writing 2023-03-12 19:26:05 +01:00
Syoyo Fujita
d171eee434 Merge pull request #407 from DavidSM64/release
Added detail namespace to prevent json namespace conflicts
v2.8.3
2023-02-19 02:08:19 +09:00
David
4562a88070 Fixed global namespace issue 2023-02-15 23:35:51 -06:00
David
032351882c Fix RapidJSON implementation (hopefully) 2023-02-15 23:21:09 -06:00
David
60831b59de Added detail namespace to prevent namespace conflicts 2023-02-15 22:56:18 -06:00
Syoyo Fujita
b18b0024c1 Merge pull request #405 from tioez326/patch-2
Fix typo
2023-02-10 21:00:27 +09:00
tioez326
165df4c474 Fix typo 2023-02-10 12:09:12 +01:00
Syoyo Fujita
9dc44e5389 Update README.md 2023-01-16 05:46:11 +09:00
Syoyo Fujita
b3c071d103 Merge pull request #401 from jmousseau/animation-channel-node-optionality
Fix animation channel target node optionality
v2.8.2
2023-01-16 05:33:40 +09:00
Jack Mousseau
ca8d44bcc7 Fix animation channel target node optionality 2023-01-15 11:45:45 -08:00
Syoyo Fujita
041356d019 v2.8.1 v2.8.1 2023-01-13 18:15:21 +09:00
Syoyo Fujita
48fbd4e223 Merge pull request #399 from e2e4e6/texture_sampler_name_fix
Missed serialization texture sampler name fixed.
2023-01-13 18:13:12 +09:00
s00665032
1fa71c34f8 Missed serialization texture sampler name fixed.
According to the glTF 2.0 specification it exists, the internal tinygltf structure contains 'name' field as well.
2023-01-13 12:52:08 +07:00
Syoyo Fujita
22bc14c27e Merge pull request #398 from nicolas-raoul/patch-1
Fixed typo
2023-01-12 16:21:35 +09:00
Nicolas Raoul
52fbd461a3 Fixed typo 2023-01-12 15:29:32 +09:00
Syoyo Fujita
9b4eb573eb Bump version 2.8.0. v2.8.0 2023-01-10 20:42:24 +09:00
Syoyo Fujita
9157308263 Merge pull request #397 from pknowlesnv/encode_image_uri
urlencode image urls
2023-01-10 20:31:39 +09:00
Pyarelal Knowles
2405584dcf add URI encode/decode API
Tinygltf is able to write files defined by a URI, so it needs to be able
to decode it. Since it may also modify the path where the image is saved
it may need to re-encode the URI too. This patch provides an API to set
URI encoding and decoding callbacks and exposes the default decode
method.

Uses the existing dlib::urldecode as a decode default. The encode
callback is left null, matching existing behaviour.

Updates the WriteImageDataFunction signature to include
tinygltf::URICallbacks.

Decodes the image and buffer uris before using them as a filename.

If the encode callback is set, encodes the written image location in the
default WriteImageDataFunction and encodes generated buffer locations
when writing .bin files.

Adds a save+load step to the test image-uri-spaces to verify uri
encoding.
2023-01-09 20:54:29 -08:00
Syoyo Fujita
c43ede6e1f Merge pull request #396 from pknowlesnv/image_write_failure
propagate image writing failures
2022-12-30 17:59:41 +09:00
Pyarelal Knowles
c7e7402efc SerializeGltfImage: add missing & std::string ref
Hopefully the compiler would optimize this away but better to avoid the
copy in the first place.
2022-12-29 14:12:29 -08:00
Pyarelal Knowles
0fbdd61dd8 propagate image writing failures
Modifies UpdateImageObject() so that Returning false from the
WriteImageDataFunction callback results in the WriteGltfScene*() call
returning false.

Does not call WriteImageDataFunction if there is no image data.

Adds test case serialize-image-failure to verify the callback return
code is able to cause an overall failure to save the gltf.
2022-12-29 13:50:17 -08:00
Syoyo Fujita
d579372d55 Update readme. 2022-12-29 21:50:47 +09:00
Syoyo Fujita
fa1d58bdb5 Merge branch 'release' of github.com:syoyo/tinygltf into release v2.7.0 2022-12-29 21:13:48 +09:00
Syoyo Fujita
dd80f8bab9 Merge pull request #393 from pknowlesnv/serialize_const
allow serializing a const Model
2022-12-29 21:00:24 +09:00
Pyarelal Knowles
4dd58c77d8 allow serializing a const Model
Adds 'const' to all Serialize*() methods.

Updates WriteImageData callback to take a URI out pointer that was
previously being written to the Image::uri, which is now const.

This breaks the WriteImageData API and as a side effect, Image::uri will
no longer contain the written image URI after saving.

Adds test serialize-const-image, which verifies the model's image is not
changed (because it's const), but the uri written to the gltf json is
still correct.

Adds test serialize-image-callback that defines a WriteImageDataFunction
and also verifies the uri can be overwritten.
2022-12-28 17:20:09 -08:00
Syoyo Fujita
18fd5cd8c8 Merge pull request #395 from ethanpepro/cmake-export
Add CMake export configuration
2022-12-28 18:33:36 +09:00
James Luke
73a7e25408 Add CMake export configuration 2022-12-27 21:12:54 -05:00
Syoyo Fujita
d8f09bbafa Merge branch 'release' of github.com:syoyo/tinygltf into release 2022-12-03 19:42:27 +09:00
Syoyo Fujita
6d6d214bfe Remove Python 2 description. 2022-12-03 19:40:50 +09:00
Syoyo Fujita
0a4442669a Update README.md
Remove Python 2.x description
2022-12-03 19:40:45 +09:00
Syoyo Fujita
6efbc4f6b4 Create FUNDING.yml 2022-12-03 18:33:05 +09:00
Syoyo Fujita
a6c693fe86 Merge pull request #390 from eduardodoria/patch-1
Added Supernova Engine to Projects using TinyGLTF
2022-11-07 21:18:50 +09:00
Eduardo Doria
830b0d6f6e Added Supernova Engine to Projects using TinyGLTF 2022-11-07 08:53:47 -03:00
Syoyo Fujita
f5c30d9f65 Merge pull request #388 from stromaster/patch-1
Avoid multiple asset_manager definitions on Android
2022-10-31 17:40:40 +09:00
Serdar Kocdemir
26a91681df Avoid multiple asset_manager definition on Android
Using TINYGLTF_IMPLEMENTATION to make the actual definition of the 'asset_manager' global variable.
2022-10-30 22:32:59 +00:00
Syoyo Fujita
7c474fca58 Merge pull request #386 from geometrian/master
Fix Clang Compile Warnings/Errors (and Typos)
2022-10-08 19:08:22 +09:00
imallett
70ffaf85a1 Patch to fix previous commit for MinGW. 2022-10-07 11:20:39 -07:00
imallett
6d1c56a8ae Fix a gazillion typos. 2022-10-07 10:37:09 -07:00
imallett
14ffe84f33 Fix various type mismatches and header include case (fixes compile warnings on Clang). 2022-10-07 10:35:16 -07:00
Syoyo Fujita
c6bb14d1f2 Merge pull request #385 from operatios/master
Fix UTF-8 filepath on LLVM MinGW
2022-09-25 05:35:36 +09:00