commit | 2026e03fab2a4dbc4e88590ac27e5560c8aecbb3 | [log] [tgz] |
---|---|---|
author | Syoyo Fujita <syoyo@lighttransport.com> | Mon Nov 27 01:01:06 2017 +0900 |
committer | Syoyo Fujita <syoyo@lighttransport.com> | Mon Nov 27 01:01:06 2017 +0900 |
tree | 2449ab1c11fa0792c7da39482ab0f98711f3bda7 | |
parent | a415cf477c441b99ea3ba42b12e27c06cd4b9de7 [diff] |
Add how to compile doc.
TinyGLTF
is a header only C++ glTF 2.0 https://github.com/KhronosGroup/glTF library.
Work in process(devel
branch). Very near to release, but need more tests and examples.
.bin
file.extensions
and extras
propertyanimation
and skin
TinyGLTF is licensed under MIT license.
TinyGLTF uses the following third party libraries.
Copy stb_image.h
, picojson.h
and tiny_gltf.h
to your project.
// Define these only in *one* .cc file. #define TINYGLTF_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION #include "tiny_gltf.h" using namespace tinygltf; Model model; TinyGLTF loader; std::string err; bool ret = loader.LoadASCIIFromFile(&model, &err, argv[1]); //bool ret = loader.LoadBinaryFromFile(&model, &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; }
T.B.W.
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