commit | 08c9d256294c5010f334dc5ffce2379445bc423c | [log] [tgz] |
---|---|---|
author | Syoyo Fujita <syoyo@lighttransport.com> | Wed May 31 00:16:45 2017 +0900 |
committer | GitHub <noreply@github.com> | Wed May 31 00:16:45 2017 +0900 |
tree | 1e913637c88806d773e03ca055a4982bdf6d6eff | |
parent | 80249464ae805d52f1026e42d377a395d5cac178 [diff] |
Revert "Feature/update tinygltf 20"
TinyGLTFLoader
is a header only C++ glTF https://github.com/KhronosGroup/glTF parsing library
.bin
file.tinygltf::Scene
class).gltf
skin
extensions
and extras
propertyTinyGLTFLoader is licensed under MIT license.
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-Sample-Models to your local dir.
After building loader_example
, edit test_runner.py
, then,
$ python test_runner.py