David Harmon
da9eac2fbe
Enable support for writing binary glTF.
2018-08-30 08:06:05 -04:00
Syoyo Fujita
5cf22e3abc
Merge branch 'master' of github.com:syoyo/tinygltf
2018-08-28 21:34:06 +09:00
Syoyo Fujita
a8f0b1c383
Suppress unknown pragma warning on clang 3.7
2018-08-28 21:33:40 +09:00
Keiji Yoshimi
c0cfc1ed95
handling stbi_write_xxx_to_func return code
2018-08-28 21:13:03 +09:00
Victor Bushong
18ef338ff5
Force default image loader to use 32-bit images for Vulkan compatibility.
2018-08-22 22:03:30 -05:00
Selmar Kok
e3b3fa9eb6
add required parameter to LoadExternalFile
2018-08-22 19:04:21 +02:00
Selmar Kok
cda38e03ed
change from warning to error for missing bin files
2018-08-22 18:26:10 +02:00
Selmar Kok
0d0e97e8cd
forward declare DataURI helper functions to allow usage outside of implementation file (in case of custom image handling)
2018-08-22 14:01:57 +02:00
Vladimír Vondruš
fd84ceb791
Properly fail also when external *.bin are missing from *.glb.
...
Consistency with behavior for external *.bin files referenced from
*.gltf.
2018-08-16 21:07:56 +02:00
Syoyo Fujita
7c8d4ed748
Added 'warning' message parameter to glTF loader API.
...
Asset loading failure messages(e.g. image file is missing) are now stored in `warning` message, not `error` message.
2018-07-27 16:49:10 +09:00
Syoyo Fujita
a71be9cc98
Merge pull request #80 from mosra/texture-name
...
Import texture names as well
2018-07-25 13:51:41 +09:00
Vladimír Vondruš
9f04583280
Don't try to expand file paths on Emscripten.
...
Since the same is done on all mobile platforms already, I think it
should not do any harm. Without this I was getting compilation/linker
errors.
2018-07-24 23:32:17 +02:00
Vladimír Vondruš
239be2c09f
Import texture names as well.
...
Every other structure has it already.
2018-07-24 23:23:56 +02:00
Syoyo Fujita
39abfb5f91
Consider Data URI buffers in binary. Fixes #79 .
2018-07-11 02:46:52 +09:00
Paolo Jovon
b2a587af96
Fixed C++11 compliance of previous commit
2018-07-07 21:50:01 +02:00
Paolo Jovon
e6601bfb4b
Added filesystem callback support
...
Now a library like PhysFS can be used to load files by defining custom
callbacks and disabling the builtin ones by #define TINYGLTF_NO_FS
2018-07-07 20:43:33 +02:00
mynz
c0d4d1c50c
parse extras on the root object
2018-06-28 23:06:00 +09:00
Jens Olsson
b3af2f1cf6
adding missing extras field serializaton
2018-06-04 11:56:00 +02:00
Jens Olsson
a9718668b4
fixing typo
2018-05-24 15:48:49 +02:00
Jens Olsson
b96f6966ab
added missing extras serialization for nodes
2018-05-24 15:29:54 +02:00
Ben Buzbee
f6af224135
Remove use of optional
2018-04-25 15:13:05 -07:00
Ben Buzbee
3b735bb878
Serialization fixes
2018-04-24 11:39:30 -07:00
Syoyo Fujita
2d17a31d3b
typedef struct
-> struct
for enabling forward declarations of struct.
2018-04-17 15:45:42 +09:00
Syoyo Fujita
48f6db0994
Suppress clang warnings.
2018-04-15 18:40:55 +09:00
Selmar Kok
341fc31aee
Merge remote-tracking branch 'origin/devel' into generic_extension_support
...
# Conflicts:
# tiny_gltf.h
2018-04-04 18:34:30 +02:00
Selmar Kok
9eae110946
serialize texture extensions
2018-04-04 18:10:37 +02:00
Selmar Kok
fa7022f364
Changed ExtensionMap to use Value instead of ParameterMap
2018-04-04 18:10:20 +02:00
johan bowald
b97d34cfee
bugfix, serializer skipped texture samplers refering to first index.
2018-04-02 07:29:29 +02:00
Syoyo Fujita
dc4bb86bf1
Suppress clang warnings.
2018-04-02 02:04:24 +09:00
johan bowald
ef151a4fed
update examples with new defines
2018-04-01 14:08:45 +02:00
johan bowald
642a343684
output both embedded and image files, small fix to serializer.
2018-04-01 12:37:18 +02:00
Syoyo Fujita
719d7e4a74
Suppress clang warnings.
...
Apply clang-format.
2018-03-30 19:26:35 +09:00
johan bowald
30c5347afe
added embed buffers as an option in serializer
2018-03-30 11:52:56 +02:00
Johan Bowald
faa2722f45
Serializer skips null values
2018-03-28 14:54:22 +02:00
Selmar Kok
5210f1539e
Merge remote-tracking branch 'origin/devel' into generic_extension_support
2018-03-26 16:22:18 +02:00
Syoyo Fujita
246654a15a
Code clean-up. Reviewed by @Squareeyes.
2018-03-21 20:32:22 +09:00
Syoyo Fujita
ba28ddcc9e
Modify error message.
2018-03-21 20:05:11 +09:00
Syoyo Fujita
8e2c24fb92
Refactor ParseImage function.
...
Returns error when both `bufferView` and `uri` are defined in Image.
2018-03-21 19:54:38 +09:00
Arthur Brainville
cd366ddd1d
Fix MSVC build: removing static keyowrd befor tinygltf::LoadImageData
...
This is peculiar:
It looks like MSVC doesn't want to build when multiple compilation units
(e.g. multiple .cc files) uses tiny_gltf and this funciton is static.
The only one file that will build without error is the one that defined
the `TINYGLTF_IMPLEMENTATION` macro.
Removing `static` here solves the issue...
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-03-19 19:54:05 +01:00
Selmar Kok
85b3cbc44d
Merge branch 'devel' into generic_extension_support
2018-03-19 16:15:22 +01:00
Syoyo Fujita
d5b0244e2c
Serialize lights under as KHR_lights_cmn extension.
2018-03-17 16:12:42 -05:00
Selmar Kok
2a15f387bc
Merge branch 'devel' into generic_extension_support
...
# Conflicts:
# tiny_gltf.h
2018-03-16 12:32:52 +01:00
Selmar Kok
5b8eb9b429
Merge branch 'devel' into opt_out_external_image_loading
2018-03-16 12:15:13 +01:00
Selmar
67af3c98aa
Allow opting out of external image loading
...
We do not require image loading for external files, we have separate texture directories at the moment.
I've also added saving the image->uri when loading a binary gltf.
2018-03-16 11:48:19 +01:00
Syoyo Fujita
580d7c8b9f
Parse defaultScene
value correcrly. Fixes #47 .
2018-03-15 22:09:01 -05:00
Syoyo Fujita
e69069d53c
Loading a GLB file without BIN data fails. Fixes #49 .
2018-03-15 22:01:18 -05:00
Syoyo Fujita
d42767e63f
Store relative URI in Buffer serializer. Fixes #48 .
...
Apply clang-format.
Add simple saver sample.
2018-03-15 21:52:00 -05:00
Selmar
7d8cbba8e4
removed code from another issue
2018-03-15 17:32:27 +01:00
Selmar
09d2ff12d8
generic extension support
...
Two issues remaining:
- The lights data exists twice on export; once outside of the gltf specification and once in the extensions.
- A lot of objects are still missing the extensions property.
2018-03-15 17:30:42 +01:00
Syoyo Fujita
20244e1e4e
Fix storing uri to Buffer.uri
. Fixes #50 .
...
Fix decoding DataURI with 'data:application/gltf-buffer;base64' mime.
2018-03-15 11:01:05 -05:00