Syoyo Fujita
bf9c2f4abd
Merge pull request #146 from WARP-LAB/master
...
Fix for when json and stb is aready used in project
2019-03-03 15:31:09 +09:00
kroko
fc0116b323
rename TINYGLTF_BYPASS_INCLUDE_x to TINYGLTF_NO_INCLUDE_x
2019-03-03 08:28:49 +02:00
kroko
6a0d4c57b1
Fix for when json and stb is aready used in project v2
2019-03-03 01:28:45 +02:00
kroko
f4b6d11abc
Fix for when json and stb is aready used in project
2019-03-03 01:11:31 +02:00
Arthur Brainville (Ybalrid)
5a4c898912
Fixed wrong metadata in case 16bit image wasn't actually loaded
...
The fallback to 8 bit would have been broken.
2019-03-02 22:03:34 +01:00
Arthur Brainville (Ybalrid)
f2addc0e44
16bit images are 16bit images: added Image::bits and Image::pixel_type
2019-03-02 22:00:48 +01:00
Sascha Willems
eb011068c0
Added function to easily access texture coordinate set index on a texture parameter
2019-02-23 21:15:45 +01:00
Syoyo Fujita
87be0ce34b
Define WIN32_LEAN_AND_MEAN to save the number of including files.
2019-02-19 21:36:32 +09:00
Syoyo Fujita
7d9a0bda3a
Define NOMINMAX to avoid defining MIN/MAX macros on Windows. Without defining NOMINMAX, MIN/MAX macro would affect other header/c++ files. Fixes #143
2019-02-19 16:03:23 +09:00
Evan Birenbaum
6bdffedcbe
Change AnimationSampler::interpolation to a non-required field. The spec states to default to LINEAR when not present.
2019-02-14 13:30:57 -08:00
timmmeh
62a72c4845
fix compile
2019-01-31 11:46:19 -08:00
timmmeh
73584ba7b7
Adding default values for min and mag filter.
2019-01-30 18:38:46 -08:00
Thomas Tissot
6c4a006496
Add line strip primitive mode define
...
This small commit adds the `TINYGLTF_MODE_LINE_STRIP` primitive mode
define whose value is set to `3` as per the GLTF 2.0 specification.
2019-01-30 13:10:51 +01:00
Alexander Wood
0d77a291f7
Updates to draco decoding:
...
- When injecting draco decoded meshes into accessor data, update count to match the optimized and decoded draco mesh
- accessor.componentType is now used for extraction of decoded draco meshes.
Fixes #135
2019-01-26 08:58:45 -05:00
Alex Wood
c8ba17fcab
Looks like I'm colliding with work by syoyo. Only difference so far appears to be our macro name.
2019-01-24 15:45:16 -05:00
Alex Wood
df39e04e7b
Merge branch 'draco' of https://github.com/abwood/tinygltf into draco
2019-01-24 15:40:28 -05:00
Alex Wood
7319db7a50
Initial support for draco mesh compression. In this PR, we establish that draco is a dependency built external to tinygltf, which breaks from the current tradition of header only dependencies. For that reason, this feature is hidden behind a #define TINYGLTF_ENABLE_DRACO and requires developers to explicitly opt-in for draco support.
...
In this change, tinygltf any primitive using draco compression will:
If indices are specified
1) Decode the index buffer using draco, creating a new buffer and bufferview, adding to Model::bufferViews and Model::buffer collections
2) Update the primitive's accessor id to reference this new decoded bufferview.
For each attribute semantic specified by the draco extension
1) Decode the vertex buffer using draco, creating a new buffer and bufferview, adding to Model::bufferViews and Model::buffer collections
2) Update the primitive's accessor id to reference this new decoded bufferview.
2019-01-24 15:38:16 -05:00
Syoyo Fujita
7ae7110800
Begin supporting draco.
2019-01-19 03:03:22 +09:00
Syoyo Fujita
af3ebb2e76
Show more expressive messages when parsing image
.
2019-01-06 18:55:57 +09:00
Sascha Willems
5f9cb24245
Added new feature for loading all gltf related files (including textures, binaries, etc.) from assets packaged with an Android app
2018-12-28 20:53:41 +01:00
Peter Le Bek
463408c4a0
Fix incorrect index into bufferViews array
2018-12-08 16:04:42 -08:00
viperscape
9df05806ad
find missing bufferView target types and fill them in
2018-12-05 14:11:01 -05:00
Selmar Kok
5892d3e3ea
Set a default for sampler.wrapR, because it was serializing an uninitialized value
2018-12-04 19:55:56 +01:00
Selmar Kok
27aab61d62
Fix prettyprint to really not print pretty
2018-11-30 18:01:31 +01:00
Unknown
ae2cf8e26f
Removed unreachable code and fixed ambiguity warning.
2018-11-15 18:36:59 +00:00
Syoyo Fujita
16fae080f9
Merge branch 'master' of github.com:syoyo/tinygltf
2018-11-10 20:08:02 +09:00
Syoyo Fujita
b572650d26
Merge branch 'master' of https://github.com/loomai/tinygltf into loomai-master
2018-11-10 20:07:15 +09:00
Selmar Kok
60f97325b1
Merge remote-tracking branch 'origin/master' into serialization_fixes
2018-11-09 10:34:55 +01:00
Selmar Kok
a3595488e3
Fix missing serialization: sampler.wrapR
2018-11-09 10:34:39 +01:00
Johan Bowald
77decfaff8
fixed a reference error which cause an error when writing images to disk
2018-11-06 14:28:20 +01:00
Syoyo Fujita
e26117e026
Merge branch 'master' of github.com:syoyo/tinygltf
2018-11-05 13:33:27 +09:00
Syoyo Fujita
33514af61a
Fix logic error. Fixes #104
2018-11-05 13:32:43 +09:00
Selmar Kok
e46774940c
fail serialization if a buffer file fails to be written (e.g. due to access rights)
2018-10-25 16:45:49 +02:00
Selmar Kok
db7f4e4d04
fix an issue when serializing an empty extension object would serialize as type null (and thus deserialize as type null, causing it to be ignored)
2018-10-10 18:10:58 +02:00
Selmar Kok
ee3d06646d
// pretty print as optional parameter, default true
...
// serialize name instead of type for camera.name
// create empy Value::Object if extension value parsing failed
2018-10-08 16:20:43 +02:00
Syoyo Fujita
924d86e362
Serialize extension with empty object. Fixes #97
...
Use pretty printing JSON when serializing for the readability.
2018-10-08 21:18:33 +09:00
Selmar Kok
440cb1e66b
tabs to spaces
2018-10-05 16:30:50 +02:00
Selmar Kok
c884e5827e
better implementation for bin file name checking
2018-10-05 16:25:54 +02:00
Selmar Kok
7cb31e4e23
- support writing multiple bin files
...
- use existing buffer.uri as filename if not empty and not a data uri
2018-10-05 16:02:29 +02:00
Selmar Kok
2bda71c8fb
- always check Parameter::number_value to catch user errors, e.g. setting number_value without setting has_number_value, which will cause it to serialize as a bool but read back in as a float anyway
2018-10-05 14:36:05 +02:00
Selmar Kok
13b6402388
Merge branch 'master' of github.com:syoyo/tinygltf into serialization_fixes
2018-10-05 14:30:16 +02:00
Selmar Kok
8eb3904de2
- Parse image extras property
...
- Optionally serialize texture.source (it is not required in the current spec)
2018-10-05 14:29:35 +02:00
Syoyo Fujita
0820d83a9d
Update to v2.0.1
2018-10-04 15:45:13 +09:00
Syoyo Fujita
641b3ccf8c
Suppress clang warnings.
...
Apply clang-format.
2018-10-04 15:43:33 +09:00
Syoyo Fujita
7518334044
Merge pull request #95 from Selmar/equality_operator_and_some_additions
...
Equality operator and some additions
2018-10-04 13:56:35 +09:00
Syoyo Fujita
efc919c022
Merge branch 'master' into devel
2018-10-04 13:55:21 +09:00
Selmar Kok
fa0a998a8b
Merge branch 'master' of github.com:syoyo/tinygltf into equality_operator_and_some_additions
...
# Conflicts:
# tiny_gltf.h
2018-10-03 15:46:23 +02:00
Selmar Kok
31cb7f92d8
// equality operator for tinygltf::Model and types contained by it
...
// double comparison (although perhaps not necessary, as json reads/writes bytes directly? unsure..)
// initialize some variables for operator==() reliabiltiy
// change some floats to doubles
// intellisense define
// serialize accessor.name
// dont serialize some names if they're empty
// return false if writing gltf file fails
2018-10-03 15:39:05 +02:00
Syoyo Fujita
e66d8c992f
Add as-is flag to Image. Tentative solution for issue #82
2018-09-02 16:58:43 +09:00
Syoyo Fujita
3e53feb046
Parse extensions
property of Image.
2018-09-02 15:36:17 +09:00