nicolasDEROUINEAU
8ed23ea55f
remove extra #endif in examples/basic app
2019-08-13 15:08:01 +02:00
Syoyo Fujita
b909fd7093
Merge pull request #182 from ux3d/textureinfo
...
[TextureInfo] fix default value checks for serialization
2019-07-26 01:29:23 +09:00
Benjamin Schmithüsen
c529f89dfc
fix default value checks for serialization
2019-07-25 16:07:27 +02:00
Syoyo Fujita
271eea8b55
Change the behavior of NUMBER value in Value class. NUMBER now reprents the value is either int or real(floating point).
2019-07-25 19:22:44 +09:00
Syoyo Fujita
dee354ca13
Update README. Add note on tinygltf::Value for extensions.
2019-07-24 19:55:04 +09:00
Syoyo Fujita
b0fd588748
Now material is parsed as a struct with explicit parameter definitions.
...
Implement Material struct serialization.
2019-07-24 19:26:48 +09:00
Syoyo Fujita
2553ec9719
Introduce TextureInfo class(W.I.P.)
2019-07-23 22:37:06 +09:00
Syoyo Fujita
d24b40d6f0
Merge pull request #180 from ux3d/master
...
Explicitly use the correct constructor for empty object
2019-07-23 18:55:34 +09:00
Syoyo Fujita
fd606a4bf5
Merge pull request #178 from rapidimages/feature/write-to-streams
...
Serialize to stream
2019-07-17 18:53:35 +09:00
Johan Bowald
f841314b72
clang format
2019-07-17 09:06:45 +02:00
Benjamin Schmithüsen
6c0a0c12be
call json constructor explicitly
2019-07-16 17:07:45 +02:00
Johan Bowald
bcc77d9517
can write to streams
2019-07-16 15:56:18 +02:00
Benjamin Schmithüsen
a7880a56a5
Merge pull request #2 from syoyo/master
...
update from original repository
2019-07-15 15:13:50 +02:00
Syoyo Fujita
af77f1d253
Merge pull request #176 from ux3d/feature/update-lights
...
Feature: update lights
2019-07-10 21:20:12 +09:00
Benjamin Schmithüsen
afda04abb0
serialize lights
2019-07-09 17:59:20 +02:00
Benjamin Schmithüsen
aafed18dfa
fix spot light parsingg
2019-07-09 16:55:55 +02:00
Benjamin Schmithüsen
e855ffe54c
parse additional light properties and fix defaults
2019-07-09 16:32:42 +02:00
Benjamin Schmithüsen
4fc1492167
update lights to follow the KHR_lights_punctual extension
2019-07-08 18:04:24 +02:00
Benjamin Schmithüsen
b5cf37f55f
Merge pull request #1 from syoyo/master
...
update fork
2019-07-08 17:40:20 +02:00
Syoyo Fujita
97fc03fb12
Merge pull request #174 from Ybalrid/pr_material_param_tex_info
...
Add Parameter::TextureStrength(). Precise default values.
2019-07-05 14:11:15 +09:00
Arthur Brianville (Ybalrid)
df4bd305f9
Applied clang-format
2019-07-05 00:30:47 +02:00
Arthur Brainville
ec2dc59665
Add Paramter::TextureStrength(). Precise default values.
...
The default values on these methods as been set to what is described [here](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0?ts=4#normaltextureinfo ) and [here](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0?ts=4#occlusiontextureinfo ).
This is to keep consistent with the API behavior from #144
2019-07-05 00:30:20 +02:00
Syoyo Fujita
04e2719e85
Merge pull request #173 from christophe-f8/master
...
Adding texture scale reading + asset copyright and texture names to the export
2019-07-04 15:39:22 +09:00
Christophe
7ea9e44323
Adding texture scale reading (for normal maps) + asset copyright and texture names to the export
2019-07-04 15:21:21 +09:00
Syoyo Fujita
cf51a5de62
Explicitly define copy constructor and copy assignment operator for Model an Node.
2019-06-29 17:31:13 +09:00
Syoyo Fujita
e1d8ed726d
Merge pull request #171 from Ybalrid/fix_double_parse_material_name
...
Material names are stored once in material.name, then duplicated in "additionalValues"
2019-06-24 14:06:55 +09:00
Arthur Brainville (Ybalrid)
3d3abb4d2c
Material names are stored once in material.name, then duplicated in "additionalValues"
...
This patch prevent this duplication
2019-06-23 21:50:10 +02:00
Syoyo Fujita
53c0ce3568
Merge pull request #170 from Ybalrid/msvc_warn_fix
...
Fix C4267 warning (size_t -> int) convertion
2019-06-15 15:58:03 +09:00
Arthur Brainville (Ybalrid)
62235695d0
Fix C4267 warning (size_t -> int) convertion
2019-06-15 07:32:38 +02:00
Syoyo Fujita
ec5f0a3653
Merge pull request #169 from Ybalrid/remove_mesh_targets
...
Remove Mesh::targets, as targets only exists inside `Primitive`
2019-05-26 16:23:46 +09:00
Arthur Brianville (Ybalrid)
d53dba0ae1
Remove Mesh::targets, as targets only exists inside Primitive
2019-05-25 22:30:55 +02:00
Syoyo Fujita
1cc4353ed8
Merge branch 'master' of github.com:syoyo/tinygltf
2019-05-16 16:55:09 +09:00
Syoyo Fujita
33629293f9
Remove CATMULLROMSPLINE, which was removed in the final glTF 2.0 spec.
2019-05-16 16:54:28 +09:00
Syoyo Fujita
d7566f59ae
Merge pull request #164 from DiligentGraphics/master
...
Updated readme: added link to Diligent Engine
2019-05-09 12:47:24 +09:00
DiligentGraphics
4f19fb156e
Updated readme: added link to Diligent Engine
2019-05-08 18:33:26 -07:00
Syoyo Fujita
4e832b7872
Merge pull request #162 from ux3d/master
...
add REQUIRE_VERSION to gltf validation and use it as default instead of REQUIRE_ALL
2019-05-03 15:08:36 +09:00
Syoyo Fujita
8edf30416d
Merge pull request #163 from jwmcglynn/fix-test-gltfs-standalone
...
Add "asset" section to BoundsChecking test models
2019-05-03 15:06:38 +09:00
Jeff McGlynn
f1819b947d
Add "asset" section to BoundsChecking test models
...
These test assets were trimmed down and erroneously didn't have an
"asset" section or version number, which is required by the glTF spec.
This fixes test failures with pull request #162 .
2019-05-02 23:05:13 -07:00
Benjamin Schmithüsen
dab2402cac
add REQUIRE_VERSION to gltf validation and use it as default instead of REQUIRE_ALL
2019-05-02 14:44:20 +02:00
Syoyo Fujita
576146c79e
Merge pull request #161 from rainliang000/patch-1
...
if image.uri empty, should use image.bufferView
2019-04-29 17:48:47 +09:00
rainliang000
8e0a60213e
if image.uri empty, should use bufferview
...
if uri empty, shoud use mimeType and bufferview
2019-04-29 09:54:27 +08:00
Syoyo Fujita
f138744e2b
Merge pull request #160 from jwmcglynn/parse-integer
...
Parse integers directly instead of casting doubles
2019-04-27 14:57:54 +09:00
Jeff McGlynn
469e039169
Parse integers directly instead of casting doubles
...
When parsing numeric values as doubles, its possible for users to
specify values that cannot be converted to integers, such as Inf, NaN,
and extremes such as 1e100. If this value is received, and then cast to
an int, it is undefined behavior, which trips ubsan when running
tinygltf under a fuzzer.
Instead of parsing integral values as doubles, use nlohmann/json's
built-in support to parse integer and unsigned values directly, with
.is_number_integer() and .is_number_unsigned().
Add ParseIntegerProperty, ParseUnsignedProperty, and
ParseIntegerArrayProperty helpers that allow parsing directly to
int/uint values and update code to use them when appropriate.
2019-04-26 17:20:50 -07:00
Syoyo Fujita
8f82515085
Merge pull request #158 from jwmcglynn/bounds-checking
...
Add checks for boundary conditions for malformed glTF files
2019-04-26 12:56:21 +09:00
Jeff McGlynn
38657337fc
Add checks for boundary conditions for malformed glTF files
...
When loading untrusted glTF files, ideally an error should be returned
if the file is malformed instead of an exception/crash. Add additional
validation for crashes found when running tinygltf under a fuzzer, and
add test cases to confirm:
1. Validate that the primitive indices value is within the
model->accessors bounds before dereferencing.
2. Validate that the accessors bufferView index if valid.
3. Validate that the buffer's index is valid when parsing images.
4. For glb files, validate that the overall length is within the
provided input buffer.
2019-04-25 16:51:09 -07:00
Jeff McGlynn
80781214df
Set up tests to run in travis-ci and ignore test outputs in .gitignore
2019-04-25 16:26:26 -07:00
Syoyo Fujita
c80f1c8a0f
Merge pull request #157 from Selmar/patch-1
...
correct Value::Equals mistake
2019-04-17 03:19:00 +09:00
Selmar
2d5f6dcbd7
correct Value::Equals mistake
...
a missing exclamation mark... ^^
2019-04-16 16:57:43 +02:00
Syoyo Fujita
bc105bb7d8
Merge pull request #155 from ffreling/accessor-normalized
...
Serialize accessor 'normalized' attribute.
2019-03-22 01:32:34 +09:00
Fabien Freling
35ac2aea2c
Serialize accessor 'normalized' attribute.
2019-03-21 17:06:22 +01:00