Commit Graph
61 Commits
Author SHA1 Message Date
Selmar Kok f8f136a99b Merge remote-tracking branch 'origin/devel' into generic_extension_support
# Conflicts:
#	tiny_gltf.h
2018-04-04 18:34:30 +02:00
Selmar Kok d0809ceed0 serialize texture extensions 2018-04-04 18:10:37 +02:00
Selmar Kok 1716f9ff93 Changed ExtensionMap to use Value instead of ParameterMap 2018-04-04 18:10:20 +02:00
johan bowald fec24cd89c bugfix, serializer skipped texture samplers refering to first index. 2018-04-02 07:29:29 +02:00
Syoyo Fujita 5f273781e7 Suppress clang warnings. 2018-04-02 02:04:24 +09:00
johan bowald 90e28a4d34 update examples with new defines 2018-04-01 14:08:45 +02:00
johan bowald 794c92542c output both embedded and image files, small fix to serializer. 2018-04-01 12:37:18 +02:00
Syoyo Fujita 696c682bc3 Suppress clang warnings.
Apply clang-format.
2018-03-30 19:26:35 +09:00
johan bowald d2cd12ec27 added embed buffers as an option in serializer 2018-03-30 11:52:56 +02:00
Johan Bowald 12f9350d16 Serializer skips null values 2018-03-28 14:54:22 +02:00
Selmar Kok d8d2732d69 Merge remote-tracking branch 'origin/devel' into generic_extension_support 2018-03-26 16:22:18 +02:00
Syoyo Fujita a84bb0eef4 Code clean-up. Reviewed by @Squareeyes. 2018-03-21 20:32:22 +09:00
Syoyo Fujita abefa6e343 Modify error message. 2018-03-21 20:05:11 +09:00
Syoyo Fujita 0955e0f838 Refactor ParseImage function.
Returns error when both `bufferView` and `uri` are defined in Image.
2018-03-21 19:54:38 +09:00
Arthur Brainville 76d44a643f 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 1265ce9c6b Merge branch 'devel' into generic_extension_support 2018-03-19 16:15:22 +01:00
Syoyo Fujita f4c21a51cb Serialize lights under as KHR_lights_cmn extension. 2018-03-17 16:12:42 -05:00
Selmar Kok 730e94b646 Merge branch 'devel' into generic_extension_support
# Conflicts:
#	tiny_gltf.h
2018-03-16 12:32:52 +01:00
Selmar Kok 15f167d6d0 Merge branch 'devel' into opt_out_external_image_loading 2018-03-16 12:15:13 +01:00
Selmar b204805de2 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 5302d9b627 Parse defaultScene value correcrly. Fixes #47. 2018-03-15 22:09:01 -05:00
Syoyo Fujita 809311a948 Loading a GLB file without BIN data fails. Fixes #49. 2018-03-15 22:01:18 -05:00
Syoyo Fujita 2faf429520 Store relative URI in Buffer serializer. Fixes #48.
Apply clang-format.
Add simple saver sample.
2018-03-15 21:52:00 -05:00
Selmar 2e4c0a50d4 removed code from another issue 2018-03-15 17:32:27 +01:00
Selmar f17ab2c39e 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 5727596f3f 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
Squareys b613c4007a Allow opting out of STB_IMAGE dependency
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 23:08:03 +01:00
Squareys a22c6b24fb Allow specifying custom image loader callback
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 23:08:03 +01:00
Squareys 6bc80acfb3 Clean up obsolete debug output
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:29:31 +01:00
Squareys 660aec3973 Remove trailing whitespaces
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:20:48 +01:00
Squareys 781aa4b770 Fix minor typo
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:20:01 +01:00
Syoyo Fujita 5bd6a463fc Fix empty serialization. Fixes #44. 2018-03-06 12:04:51 +09:00
Omar C. F 3cec231409 Fix return value when error occurs 2018-02-10 09:50:35 +02:00
Omar C. F 8b311835c5 Add missing bmp and gif mimetypes 2018-02-10 09:09:41 +02:00
Syoyo Fujita 4a6652650b Merge branch 'devel' of github.com:syoyo/tinygltf into devel 2018-01-21 12:20:00 +09:00
Syoyo Fujita 1c6707eb66 Set GL_DOUBLE value from OpenGL spec. Fixes #35. 2018-01-21 12:19:01 +09:00
Syoyo Fujita c5a09f6a3b Suppress clang warnigns.
Refactor code to use C++11 features.
2018-01-16 18:55:13 +09:00
Arthur Brainville 3b05513ba9 Silence a MSVC warning about narrowing conversion
We actually want to convert a size_t value into an int value in this
return statement.

Fix the annoying MSVC warning by actually casting the bytestride to an
int

Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-10 01:27:12 +01:00
Arthur Brainville 3cd62e26e8 rename Color to ColorFactor
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-08 18:37:44 +01:00
Arthur Brainville e4a2b2e942 Const qualify const methods
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-08 18:32:48 +01:00
Arthur Brainville 9adf96e18e Add little utility methods to access the content of a Parameter object
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-08 18:25:52 +01:00
Syoyo Fujita 1b0040eff8 Fix argument to catch claus was wrong.
Add support to compile TinyGLTF with no C++ exception(TINYGLTF_NOEXCEPTION). Fixes #18.
Add initial unit tests.
2018-01-05 20:14:46 +09:00
Syoyo Fujita c7ebe93a70 Add method for computing byteStride to Accessor struct.
This would fix issue #29.
2018-01-03 17:47:08 +09:00
Cemalettin Dervis 9cf0faece1 Fixed typo ("RPEAT") 2017-12-07 20:29:51 +01:00
Syoyo Fujita f101588f35 Merge branch 'devel' into jsoncpp 2017-12-02 21:14:13 +09:00
Syoyo Fujita 0eaf4daa5c Fix compile on iOS. Fixes #24. 2017-11-15 01:03:09 +09:00
Emanuel Schrade fafd4eca2a Parse KHR_Lights_cmn extension 2017-11-06 11:14:49 +01:00
Syoyo Fujita 4959fc4857 User lowercase for Windows.h. Fixes #22. 2017-11-05 17:18:46 +09:00
Syoyo Fujita 92fc93d641 Use json.hpp instead of picojson(W.I.P.) 2017-11-05 17:13:24 +09:00
Syoyo Fujita bd8b97272a Improve error message. 2017-10-19 18:48:26 +09:00