commit | b37b7de27c316051991e1c929447e2237014268e | [log] [tgz] |
---|---|---|
author | Syoyo Fujita <syoyo@lighttransport.com> | Sun Jun 05 22:35:37 2016 +0900 |
committer | Syoyo Fujita <syoyo@lighttransport.com> | Sun Jun 05 22:35:37 2016 +0900 |
tree | 812d7121fe3cb9a1edff82218b89f07216ccc38a | |
parent | e04b1b56d86dcc012064cb94c645854d559dfbab [diff] |
Retinal display fix for glview.
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