From d7ec19c3dc5a6c7e13259907c83527fc49dd44f9 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Tue, 30 May 2017 00:52:00 +0900 Subject: [PATCH] Fix Animation dumper. --- loader_example.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loader_example.cc b/loader_example.cc index 500fdb7..b26faa1 100644 --- a/loader_example.cc +++ b/loader_example.cc @@ -384,7 +384,7 @@ static void Dump(const tinygltf::Model &model) { std::cout << Indent(1) << "samplers(items=" << animation.samplers.size() << ")" << std::endl; for (size_t j = 0; j < animation.samplers.size(); j++) { - const tinygltf::AnimationSampler &sampler = animation.samplers[i]; + const tinygltf::AnimationSampler &sampler = animation.samplers[j]; std::cout << Indent(2) << "input : " << sampler.input << std::endl; std::cout << Indent(2) @@ -514,9 +514,11 @@ int main(int argc, char **argv) { bool ret = false; if (ext.compare("glb") == 0) { + std::cout << "Reading binary glTF" << std::endl; // assume binary glTF. ret = loader.LoadBinaryFromFile(&model, &err, input_filename.c_str()); } else { + std::cout << "Reading ASCII glTF" << std::endl; // assume ascii glTF. ret = loader.LoadASCIIFromFile(&model, &err, input_filename.c_str()); }