796 Commits

Author SHA1 Message Date
Arthur Brainville
db5b272a1b
Load the normal vectors of the primitive
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:56 +01:00
Arthur Brainville
5682cb4542
Also access the position attribute of the primitive
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:56 +01:00
Arthur Brainville (Ybalrid)
7c54677acd
Now load index buffer
Added some template infrastructure to read arrays where type is defined by a value.

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:56 +01:00
Arthur Brainville (Ybalrid)
b8040e2a19
Add the entry point for loading gltf files.
Also switch on the primitive mode of each mesh. Will only attempt to
load lists of triangles for now...

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:56 +01:00
Arthur Brainville (Ybalrid)
e42ba4e404
Only attempt to load the obj file if the obj_filename is defined in json
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:56 +01:00
Arthur Brainville (Ybalrid)
cc4fd4be8e
Small adjustment to the NanoSG readme
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:37 +01:00
Arthur Brainville (Ybalrid)
f4fbee1cdf
Add files to .gitignore
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:42:11 +01:00
Arthur Brainville
088aa0210f
Fix where stb image is actually implemented
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:40:50 +01:00
Arthur Brainville (Ybalrid)
1340e62848
Setup CI for raytrace example
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-20 14:40:33 +01:00
Syoyo Fujita
d800c88d09 Merge branch 'devel' of github.com:syoyo/tinygltf into devel 2018-02-19 19:28:17 +09:00
Syoyo Fujita
ca8cfee824 Add link to Vulkan-glTF-PBR. 2018-02-19 18:05:47 +09:00
Arthur Brainville (Ybalrid)
c9ec1ea7b6
Add a gltf_filename feild to the renderconfig struct
This is to get the filename that will be given to the gltf-loader

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 21:01:59 +01:00
Arthur Brainville (Ybalrid)
adfe936dd3
Applyind clang-format on main.cc. Included gltf-loader
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 20:24:57 +01:00
Arthur Brainville (Ybalrid)
e1e868a704
Move the implementation of stbi to it's own .cc file
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 20:09:24 +01:00
Arthur Brainville (Ybalrid)
75af411fda
Build the tinygltf loader code
Also remove the implementation of STB-Image from obj-loader.cc

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 19:55:02 +01:00
Arthur Brainville (Ybalrid)
90ff6f7ce9
Make this code buildable as is
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 19:21:38 +01:00
Arthur Brainville (Ybalrid)
c81be8f87d
Add the current code of nanort + nanosg
This implementation will be based on commit
b31dc0bd92eb7ac896079849a2205fac4abbd087 from the nanort project

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 19:16:16 +01:00
Arthur Brainville (Ybalrid)
fb7ebb955e
Remove old nanort/nanosg code. Keep the gltf-loader class on hand
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 19:13:57 +01:00
Syoyo Fujita
c7ae1a3e76
Merge pull request #38 from o-micron/patch-2
Fix LoadImageData return value when error occurs
2018-02-10 16:53:00 +09:00
Omar C. F
d492efc38a
Fix return value when error occurs 2018-02-10 09:50:35 +02:00
Syoyo Fujita
568f05fec9
Merge pull request #37 from o-micron/patch-1
Add missing bmp and gif mimetypes
2018-02-10 16:11:35 +09:00
Omar C. F
f8a8d9caa0
Add missing bmp and gif mimetypes 2018-02-10 09:09:41 +02:00
Syoyo Fujita
0d9a495fd1
Merge pull request #36 from Ybalrid/devel_add_gitignore
Add gitignore file
2018-02-02 00:57:32 +09:00
Arthur Brainville (Ybalrid)
a62e955a52
Add gitignore file
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-01 15:38:34 +01: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
Syoyo Fujita
f2aba36638 Add more note on Visual Studio version. 2018-01-11 14:06:10 +09:00
Syoyo Fujita
688236a3a8
Merge pull request #34 from Ybalrid/patch-1
Add language tags on code snippets in README
2018-01-10 20:52:24 +09:00
Arthur Brainville
d93364e63f
Add language tag on code snippets in README 2018-01-10 12:04:51 +01:00
Syoyo Fujita
e3a7aef197 Describe note on Visual Studio version. 2018-01-10 18:32:51 +09:00
Syoyo Fujita
85ed1ac824
Merge pull request #33 from Ybalrid/CI_fix
Attempt to fix continuous integration (fix #31)
2018-01-10 18:30:45 +09:00
Arthur Brainville (Ybalrid)
760c1a5065
Change VS version to one that is better compatible with C++11
Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-01-10 09:09:21 +01:00
Syoyo Fujita
f0606e83d3
Merge pull request #32 from Ybalrid/narrowingConversionWarning
Silence a MSVC warning about narrowing conversion
2018-01-10 12:20:28 +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
Syoyo Fujita
45c29dc54d Update README of gltf-validator. 2018-01-09 14:28:16 +09:00
Syoyo Fujita
1b482fe0be
Merge pull request #30 from Ybalrid/simplerMaterial
Simpler material data retreival
2018-01-09 12:19:03 +09: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
1ebd29d84e Remove unnecessary text. 2018-01-05 20:21:27 +09:00
Syoyo Fujita
f5318cc759 Describe more about C++ exception. 2018-01-05 20:17:37 +09: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
Syoyo Fujita
3ab8ee1f87 Add name of Adrien and many contributrors. 2017-12-31 18:36:02 +09:00
Syoyo Fujita
daa726ec7c
Merge pull request #28 from Ybalrid/devel
Create LICENSE file according to the terms of the MIT License agreement
2017-12-31 15:02:01 +09:00
Arthur Brainville
5194b47a16 Create LICENSE
This library is an awesome project, and I can imagine a lot of 3D application written in C++ would happily use it to load glTF assets ;-)

However, the license wasn't properly stated on the project. To actually put work under the term of the MIT license agreement, a copyright notice **needs** to be distributed alongside the source code.

It is also standard practice to add a warranty disclaimer. This prevent people to hold you liable if (at least they think) something doesn't work because of this library.

I took the liberty to put the file in place, with your full name as stated on your GitHub profile as the copyright holder. This is the text that states that you, the author, grants the to other people to use this as a free/open-source software, with all the thing that comes with it (access to source code, right to modify, redistribute, redistribute modified version, and use for any purpose they like) 

Sorry for the annoyance ^^"
2017-12-31 04:07:06 +00:00
Syoyo Fujita
b66d68f3fb Report error message. 2017-12-19 18:45:22 +09:00
Syoyo Fujita
85591954ab Update README. 2017-12-19 18:29:34 +09:00
Syoyo Fujita
dac2a89b63 Fix wrong return value(Fixes #26) 2017-12-19 17:58:32 +09:00