commit | 8317ffbe8a76a2b5b591a9306306f66345579894 | [log] [tgz] |
---|---|---|
author | Syoyo Fujita <syoyo@lighttransport.com> | Sat Jun 11 16:10:39 2016 +0900 |
committer | Syoyo Fujita <syoyo@lighttransport.com> | Sat Jun 11 16:10:39 2016 +0900 |
tree | 5365d1cc2d059565851d8bb7d9abc6ee30f6ea03 | |
parent | 9a478238c75fed8e7bfc2ea8f36157b6b29c9208 [diff] |
Improve windows build. Don't report error when `in_normal` is not used in the shader.
TinyGLTFLoader
is a header only C++ glTF https://github.com/KhronosGroup/glTF parsing library
.bin
file..gltf
animation
, program
, sampler
, shader
, technique
extensions
and extras
propertyTinyGLTFLoader is licensed under 2-clause BSD.
TinyGLTFLoader uses the following third party libraries.
Copy stb_image.h
, picojson.h
and tiny_gltf_loader.h
to your project.
// Define these only in *one* .cc file. #define TINYGLTF_LOADER_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION #include "tiny_gltf_loader.h" using namespace tinygltf; Scene scene; TinyGLTFLoader loader; std::string err; bool ret = loader.LoadASCIIFromFile(scene, err, argv[1]); //bool ret = loader.LoadBinaryFromFile(scene, err, argv[1]); // for binary glTF(.glb) if (!err.empty()) { printf("Err: %s\n", err.c_str()); } if (!ret) { printf("Failed to parse glTF\n"); return -1; }
Python 2.6 or 2.7 required. Git clone https://github.com/KhronosGroup/glTF to your local dir.
After building loader_test
, edit test_runner.py
, then,
$ python test_runner.py