Syoyo Fujita
612e57816f
Fix handling <4 byte BIN data.
...
Fix handling GLB file with empty CHUNK1(BIN).
2022-09-18 21:01:39 +09:00
Kh4n
6514490090
update gitignore to remove test file
...
readd accidental removals in gitignore
undo autoformat
more undo autoformatting
2022-09-17 12:52:59 -05:00
Syoyo Fujita
c670f08a3b
Fix parsing GLB file with empty Chunk1(BIN data).
2022-09-17 19:52:25 +09:00
Syoyo Fujita
eec4c98862
Add note on v2.6.2(Fix out-of-bounds access of accessors. PR#379)
2022-09-16 17:27:20 +09:00
AlvaroBarua
43172238f7
Fixes compiler warning on VS (Unreachable code detected)
2022-09-11 00:41:43 +01:00
Nirmal Patel
e413216722
Fix possible out of bounds index in LoadFromString
2022-09-06 09:16:31 -07:00
Syoyo Fujita
4581d37bec
v2.6.1
2022-09-06 22:02:31 +09:00
Syoyo Fujita
966a9d0df7
Merge pull request #374 from syoyo/glb_chunk_check
...
Better GLB data size check when reading.
2022-09-06 21:35:47 +09:00
zbendefy
69eeea145b
Auto detect C++14 standard version
2022-09-05 23:54:57 +02:00
Marcin Kacprzak
f4f5c3cf3a
Fix read from moved object.
2022-09-02 16:15:54 +02:00
Marcin Kacprzak
b12a54ed15
Silence MS code analysis tool.
2022-09-02 16:13:11 +02:00
Syoyo Fujita
46ee8b4276
GLB: Fix interger-overflow when calculating JSON Chunk size.
...
GLB: Check BIN Chunk size.
GLB: Chenk byte alignment of each chunk.
2022-08-26 22:06:53 +09:00
Syoyo Fujita
3bddc09af4
Update README.
2022-08-19 18:21:24 +09:00
Syoyo Fujita
9117abb45d
Merge branch 'master' of github.com:syoyo/tinygltf
2022-08-16 20:11:52 +09:00
Syoyo Fujita
52ff00a384
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(wordexp
).
2022-08-16 20:08:45 +09:00
feiy
1a8814d687
Sparse accessor serialization: typo fix.
2022-08-14 19:49:07 +08:00
feiy
0b31543098
Adding serialization code for sparse accessors.
2022-08-13 10:08:17 +08:00
Syoyo Fujita
81f7dbe53a
Partial fix of issue 365
2022-08-02 01:05:34 +09:00
Syoyo Fujita
544969b732
Check the failure of RapidJson Accept(). Fixes #332
...
TODO: Better error reporting when Accept() failed.
2022-07-13 19:03:33 +09:00
Hendrik Schwanekamp
41e1102e57
fix images not beeing embeded into stream
2022-06-29 12:22:40 +02:00
Christopher Sean Morrison
2c9b25642b
treat powerpc as big endian too
...
added powerpc to the list of big endian types
2022-05-14 19:00:19 -04:00
Martin Gerhardy
fae6543b7a
Fixed find_last_of call in GetBaseFilename
...
this leads to a stack overflow on linux - it looks like this magically works on msvc though...
2022-03-13 18:42:39 +01:00
Syoyo Fujita
6ed7c39d71
Add note on componentType double type.
2022-03-03 16:40:54 +09:00
Syoyo Fujita
cbd3885049
Check required attribute exists for SparseAccessor.
2022-02-26 21:19:15 +09:00
Jack Mousseau
9471517c1e
Fix byte offset optionality for sparse accessor indices and values
2022-02-24 14:25:37 -08:00
Eero Pajarre
51b12d2546
Added missing comparison for wrapS
2022-02-24 14:38:20 +02:00
Christopher Sean Morrison
0bfcb4f49e
add missing switch case for binary
...
with warnings cranked up and warnings-as-errors enabled, the compiler throws an error due to this switch missing a case for binary. this makes the ignore explicit in order for compilation to proceed.
2022-02-23 10:02:49 -05:00
Alexander Wood
e4bc6c7bd4
- Remove clang warning suppression. I assume this stackoverflow reference can just be removed as it isn't a code snippet but a repost of clang documentation of ignoring warning levels.
...
- Remove stackoverflow reference that recommends the use of dlib. There's no source that was pulled from this s.o. post, only a recommendation on a library, I wouldn't think a link to s.o. is necessary here. Per the Boost License, I've included a copy of the license along with the snippet
2021-10-14 08:54:59 -04:00
Alexander Wood
13803659f8
Build fix.
2021-10-08 20:13:07 -04:00
Alexander Wood
a3d5d5d1c9
Build fix.
2021-10-08 20:09:08 -04:00
Alexander Wood
9e3d1f6db5
Build fix.
2021-10-08 16:57:56 -04:00
Alexander Wood
190382aecd
GetBaseFilename contained a logic error in that a filename that does not contain a path separator would result in a crash.
...
Removed the roundUp lambda, as this generalization is not necessary; the caller always attempts 4 byte alignment.
2021-10-08 12:19:13 -04:00
Julian Smith
0598a20cce
Fix for OpenBSD - wordexp.h not available.
2021-08-25 12:06:08 +01:00
Idriss Chaouch
425195bf9c
update enum Type
...
the first element in an enum is 0, so it's not necessarily to affect values from 0 to 7.
2021-05-20 12:11:00 +01:00
zz
8a35b8f6fe
Fix comment on minFilter
2021-05-14 13:49:33 +08:00
Mio Nilsson
e29ba7c49a
🐛 Store scene extras and exteions on the scene
...
This was being stored in the wrong place
2021-05-11 11:50:35 +02:00
Syoyo Fujita
d07b976d59
Do not write negative skeleton
id(skeleton is not assigned).
...
Also ensure `inverseBindMatrices` should not be -2 or other negative values.
2021-04-28 19:15:16 +09:00
snowapril
87da1e775f
Delete unused variable initialization code
...
Line 4536 in tinygltf.h file, there is unused variable initialization code like below.
```c++
const auto pBuffer = pAttribute->buffer();
```
gcc compiler complain about that unused variable.
I found there is no side-effect in `pAttribute->buffer()` call and also pBuffer variable is never used. Therefore I delete that line entirely.
2021-03-30 00:16:04 +09:00
snowapril
84e15260ba
add (void)err for handling unused variable warning
...
I saw in the `ParseExtensionsProperty`(3667) function,
unused variable err argument is wrapped with (void) keword.
I think err argument in the `ParseDracoExtension`(4472) is exactly
same situation with the above one.
For consistency, I think it need to be added (void)err in the
`ParseDracoExtension` function.
2021-03-20 19:25:58 +09:00
Alvaro Barua
3ddf8301f6
Added TINYGLTF_NO_INCLUDE_RAPIDJSON for consistency and because my project already used rapidjson/
2021-03-18 00:21:23 +00:00
Syoyo Fujita
b702de755f
asset.version
is a required field so write "2.0" when asset.version
is empty. Fixes #308
2021-03-02 19:08:29 +09:00
Hill Ma
d1e32865f1
Drop an unnecessary 'const'.
2021-02-20 22:30:44 -08:00
Selmar
1208f057d6
check correct extensionsUsed
for serialization
2021-02-01 19:24:41 +01:00
Syoyo Fujita
f684dde9f1
Merge pull request #303 from syoyo/int-minmax-serialize
...
Issue #301 . Serialize accessor min/vax value as int
2021-01-22 03:40:52 +09:00
Syoyo Fujita
7905a5b4dc
Issue #301 . Serialize accessor min/vax value as int if its component type is an integer.
2021-01-21 20:33:11 +09:00
Syoyo Fujita
2c521b3432
Remove sampler.wrapR parameter(unused tinygltf extension). Fixes #287
...
Suppress clang `-Wdocumentation-unknown-command` warning.
2020-12-04 00:50:46 +09:00
Syoyo Fujita
010ee9c67b
Add SetPreserveImageChannels feature(preserve image channels in stored image file. Only effective when using builtin ImageLoad function(STB image load)).
2020-10-31 19:35:55 +09:00
Syoyo Fujita
68adc4ba5e
Serialize empty JSON object when material has all default parameters. Fixes #294 .
2020-10-22 22:27:12 +09:00
Syoyo Fujita
91da299729
Fix inequality. Should allow 0 for bufferView.
2020-07-15 13:52:39 +09:00
Rahul Sheth
125e4a2033
Fix sparse morph targets
2020-07-13 13:56:50 -04:00