Commit Graph

1029 Commits

Author SHA1 Message Date
Syoyo Fujita
ffa2c665f9 Allow zero-sized BIN chunk. Fixes #440 v2.8.20 2024-01-24 05:43:27 +09:00
Syoyo Fujita
29cfe103f8 Deprecate Travis CI and remove Travis CI scripts. Fixes #439 2023-12-11 21:00:35 +09:00
Syoyo Fujita
1f91e9b662 Merge pull request #467 from rhiskey/release
Small security and overflow patch
v2.8.19
2023-12-05 06:42:19 +09:00
rhiskey
4df21f6df6 Update stb_image_write.h
Provided `sizeof(buffer)` in `sptintf`
2023-12-05 00:28:18 +03:00
rhiskey
ae7b113cad Revert back stb_image_write.h to original code 2023-12-05 00:21:41 +03:00
rhiskey
359cf50a0f Update stb_image_write.h
Fixed case when  `__STDC_LIB_EXT1__ ` is not defined - for Linux, etc. According to the C99 standart @syoyo
2023-12-05 00:15:50 +03:00
rhiskey
cf55186b0b Update tiny_gltf.h
Removed `#undef` 
and used the @syoyo method:

https://github.com/syoyo/tinygltf/pull/467#issuecomment-1838703699
2023-12-04 17:11:59 +03:00
rhiskey
808ab042e9 Update tiny_gltf.h
Fixed `Windows.h` MINMAX error and reverted to original numeric limits of type `uint32_t`
2023-12-04 16:57:36 +03:00
rhiskey
aa2fb04ab7 Merge branch 'syoyo:release' into release 2023-12-04 16:55:16 +03:00
Syoyo Fujita
354c1146ee Fix possible nullptr dereferencing.
Add missing `return false`
2023-12-04 22:50:49 +09:00
rhiskey
a68be31c9d Update stb_image_write.h
Securing printing output via `sprintf_s` instead `sprintf`.
2023-12-04 14:22:14 +03:00
rhiskey
46fd11cef1 Update tiny_gltf.h
Fix max size of `header_and_json_size` limit.
In case of 4GB will check ` sizeof(uint64_t)` insted deprecated max
2023-12-04 14:21:06 +03:00
Syoyo Fujita
fb3ff961f8 Merge pull request #465 from ptc-tgamper/bug/issue464
Fix Empty scenes are wrongly serialized as null Issue #464
2023-11-23 23:28:39 +09:00
Thomas Gamper
cef28f1791 Fix #464
tinygltf.h - serialize empty scenes as empty json objects; tester.cc - ad respective test case, bring test cases in correct order, tag test case for light index with correct issue number and fix it to compare to deserialozed model
2023-11-23 15:14:46 +01:00
Syoyo Fujita
cb4dcef520 Merge pull request #463 from ptc-tgamper/bug/issue458
Fix Light reference in the node issue #457
2023-11-23 22:19:05 +09:00
Thomas Gamper
46a1e426d1 fix #457
tiny_gltf.h - access correct json object when serializing a light, this fixes an assert and causes us to serialze the light index properly; tester.cc - add respective testcase
2023-11-23 14:13:12 +01:00
Syoyo Fujita
f54bbd847e Merge pull request #462 from ptc-tgamper/bug/issue457
Fix Empty nodes are wrongly serialized as null Issue #457
2023-11-23 21:52:47 +09:00
Thomas Gamper
439d103665 fix #457
tiny_gltf.h - make sure to serialize null node as empty object; tester.cc - add respective test case
2023-11-23 11:59:18 +01:00
Syoyo Fujita
a65d2d6de1 Merge pull request #460 from ptc-tgamper/bug/issue459
Fix Default constructed Material has wrong emissiveFactor #459
2023-11-23 02:21:28 +09:00
Thomas Gamper
d66d9d291b fix #459
tiny_gltf.h - use member initialization
2023-11-22 15:59:13 +01:00
Thomas Gamper
925d783330 fix #459
tiny_gltf.h - properly initialise emissiveFactor; tests/tester.cc - add test case
2023-11-22 14:17:46 +01:00
Syoyo Fujita
817ce1a9d0 Merge pull request #456 from haroonq/patch-1
Allow BufferView indices to be unspecified.
v2.8.18
2023-10-10 21:24:51 +09:00
haroonq
8036d6a00f Allow BufferView indices to be unspecified.
Allow BufferView indices for element array buffers to be unspecified to support some extensions.

Note that this is similar to how invalid array buffers are handled in order to support, for example, sparse morph targets.
2023-10-09 10:30:25 +00:00
Syoyo Fujita
e525653fbd Merge pull request #455 from nyalldawson/fix_message
Fix incorrect component type shown in warning message
v2.8.17
2023-09-12 20:28:35 +09:00
Nyall Dawson
1fc0f8056d Fix incorrect component type shown in warning message 2023-09-12 08:46:14 +10:00
Syoyo Fujita
d7449cc0d6 Remove unused code. Fixes #454 v2.8.16 2023-09-07 22:03:46 +09:00
Syoyo Fujita
616604c5c5 Merge pull request #453 from nyalldawson/fix_draco
Fix build with draco
2023-09-07 21:35:55 +09:00
Nyall Dawson
7db1b126b8 Fix build with draco 2023-09-07 08:20:28 +10:00
Syoyo Fujita
9f4ac79720 Merge pull request #452 from nyalldawson/permissive_align
Relax bin chunk end alignment check in permissive mode
2023-09-07 06:46:11 +09:00
Nyall Dawson
e387e3a221 Relax bin chunk end alignment check in permissive mode 2023-09-07 07:08:26 +10:00
Syoyo Fujita
0e5a1c9be9 Merge pull request #450 from nyalldawson/fix_win
Fix msvc build -- STRICT is a msvc macro name
2023-09-07 05:59:12 +09:00
Nyall Dawson
7f514ca27b Fix msvc build -- STRICT is a msvc macro name 2023-09-07 06:28:37 +10:00
Syoyo Fujita
706cfb4cde Merge pull request #451 from nyalldawson/mingw
Add mingw msys2 workflow
2023-09-06 20:55:14 +09:00
Nyall Dawson
b4e5d07c9f Add mingw msys2 workflow 2023-09-06 08:26:34 +10:00
Nyall Dawson
2aad0ce782 Fix warning when building without draco support 2023-09-03 09:04:56 +10:00
Syoyo Fujita
9977c05b4b Merge pull request #449 from emimvi/consistent_byteOffset
Always use size_t for byte offsets
2023-09-03 02:20:35 +09:00
Syoyo Fujita
7b2ae68239 Merge pull request #447 from nyalldawson/draco_fix
Handle the situation where the recorded component type does not match the required type for the actual number of stored points
2023-09-03 02:17:12 +09:00
emimvi
8b24ce8f3a Consistently use size_t for all byteOffset's 2023-09-02 09:39:53 +02:00
Nyall Dawson
3cf58eef43 When in permissive mode, handle the situation where the
recorded component type does not match the required type
for the actual number of stored points

This situation arises when decoding certain malformed files, most
notably it's seen in glb tiles from Google Earth's 3d tileset.

It's a port of the workaround used by Cesium native here:

d9172461e2/CesiumGltfReader/src/decodeDraco.cpp (L101)
2023-09-02 10:16:04 +10:00
emimvi
7dc9766ce1 Serialize byteOffset as size_t, avoiding cast
Fixes silently writing an overflowed int in the output file.
2023-09-02 00:11:41 +02:00
Syoyo Fujita
c94ffcfeb7 Merge pull request #445 from nyalldawson/permissive
Be tolerant when encountering emissiveFactor with array length 4
v2.8.15
2023-09-01 23:10:29 +09:00
Nyall Dawson
285e87211c Add method to set parsing strictness 2023-08-28 12:56:09 +10:00
Nyall Dawson
e65694cc7d Raise a warning when encountering emissiveFactor with array length
of 4 instead of aborting the model loading
2023-08-28 12:46:44 +10:00
Syoyo Fujita
5d3c322e89 Merge pull request #446 from nyalldawson/fix_error
Fix misleading error message
2023-08-24 22:11:50 +09:00
Nyall Dawson
6c6e131792 Fix misleading error message
Avoids a confusing "Must have 4 bytes or more bytes, but got 4."
error.
2023-08-24 11:48:09 +10:00
Syoyo Fujita
c015b60ddd Merge pull request #442 from turanszkij/release-1
added project link to readme
2023-08-07 18:32:30 +09:00
Turánszki János
9b5fe332a2 added project link to readme 2023-08-07 06:59:35 +02:00
Syoyo Fujita
737a0b57c6 Merge pull request #433 from dyollb/modernize
Modernize
v2.8.14
2023-07-11 19:43:53 +09:00
Syoyo Fujita
fe42a91023 Merge pull request #436 from dimitri-tdg/bugfix_extensions_primitive
Fix issue when serializing extensions of a primitive
2023-07-10 23:30:40 +09:00
KUDELSKI Dimitri
ebbcdf999f Fix issue when serializing extensions of a primitive 2023-07-10 15:13:09 +02:00