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
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
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
Squareys
2d3594de22
Allow opting out of STB_IMAGE dependency
...
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 23:08:03 +01:00
Squareys
ff644d82c9
Allow specifying custom image loader callback
...
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 23:08:03 +01:00
Squareys
f99f760b07
Clean up obsolete debug output
...
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:29:31 +01:00
Squareys
4337463c79
Remove trailing whitespaces
...
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:20:48 +01:00
Squareys
188965b11e
Fix minor typo
...
Signed-off-by: Squareys <squareys@googlemail.com>
2018-03-13 22:20:01 +01:00
Syoyo Fujita
179edbf054
Fix empty serialization. Fixes #44 .
2018-03-06 12:04:51 +09:00
Omar C. F
d492efc38a
Fix return value when error occurs
2018-02-10 09:50:35 +02:00
Omar C. F
f8a8d9caa0
Add missing bmp and gif mimetypes
2018-02-10 09:09:41 +02:00
Syoyo Fujita
89cd83e22f
Merge branch 'devel' of github.com:syoyo/tinygltf into devel
2018-01-21 12:20:00 +09:00
Syoyo Fujita
476a8b21b0
Set GL_DOUBLE value from OpenGL spec. Fixes #35 .
2018-01-21 12:19:01 +09:00
Syoyo Fujita
05e0bf1cdc
Suppress clang warnigns.
...
Refactor code to use C++11 features.
2018-01-16 18:55:13 +09:00
Arthur Brainville
8ce4e54394
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
9585391311
rename Color to ColorFactor
...
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-08 18:37:44 +01:00
Arthur Brainville
41fe772058
Const qualify const methods
...
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-08 18:32:48 +01:00
Arthur Brainville
5845319b1a
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
17cfbcc976
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
584f8c0ddf
Add method for computing byteStride to Accessor struct.
...
This would fix issue #29 .
2018-01-03 17:47:08 +09:00
Cemalettin Dervis
246d866961
Fixed typo ("RPEAT")
2017-12-07 20:29:51 +01:00
Syoyo Fujita
836753132b
Merge branch 'devel' into jsoncpp
2017-12-02 21:14:13 +09:00
Syoyo Fujita
b23f6fe492
Fix compile on iOS. Fixes #24 .
2017-11-15 01:03:09 +09:00
Emanuel Schrade
186322bed6
Parse KHR_Lights_cmn extension
2017-11-06 11:14:49 +01:00
Syoyo Fujita
ef2f49ff19
User lowercase for Windows.h. Fixes #22 .
2017-11-05 17:18:46 +09:00
Syoyo Fujita
2e21be7e19
Use json.hpp instead of picojson(W.I.P.)
2017-11-05 17:13:24 +09:00
Syoyo Fujita
57c1018f89
Improve error message.
2017-10-19 18:48:26 +09:00
Florian Märkl
d525e19582
Disable wordexp for Android
2017-09-22 15:25:48 +02:00
jianghaosen
4748ad61c0
fix(row1728): accessor->normalize is a local variables and forget initial it. Beside, the value of p
...
accessor->normalize is a local variables and forget initial it, it may be true or false. Beside, the
value of parse glTF do not assign to normalize.
2017-08-29 20:08:37 +08:00
jianghaosen
b721fb76c6
fix(row926): a bug that filename is empty when parse glb
...
when parse glb, filename maybe a empty value, it will be wrong
2017-08-25 21:01:17 +08:00
Syoyo Fujita
59130d1a19
Check if JSON element is valid JSON object or not. Now all fuzz input passes. Fixes #16 .
2017-08-01 20:23:11 +09:00
Syoyo Fujita
cdf849061c
Wrap picojson::parse with exception clause to catch JSON parsing error.
2017-08-01 20:12:08 +09:00
Syoyo Fujita
2b0307f397
Hardened parsing and solved some issue found by fuzzer(issue 16).
2017-08-01 18:15:52 +09:00
Syoyo Fujita
7b6edab3a9
Initial support of parsing/serializing Camera.
2017-07-13 18:20:14 +09:00
Syoyo Fujita
d9d012a5df
Accessor.min and Accessor.max are now optional parameter.
...
Set BufferView.byteStride default value to 0(= tightly packed). Fixes #13 .
2017-07-12 18:29:29 +09:00
Syoyo Fujita
822788921e
Delete Accessor.byteStride
field which was removed in glTF 2.0 spec.
2017-06-26 17:54:34 +09:00
Syoyo Fujita
a12620f378
Fix bufferView.byteStride is read into byteLength
property. Fixes #9
2017-06-24 20:57:05 +09:00
Syoyo Fujita
2840a0eb48
Rename filename/define/class name.
2017-06-21 02:52:11 +09:00