Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <vector>
  5.  
  6. #include "Converter.h"
  7. #include "tiny_gltf.h"
  8.  
  9. #define TINYGLTF_IMPLEMENTATION
  10. #define STB_IMAGE_IMPLEMENTATION
  11. #define STB_IMAGE_WRITE_IMPLEMENTATION
  12. #define STBI_MSC_SECURE_CRT
  13.  
  14. using namespace std;
  15. using namespace tinygltf;
  16.  
  17.  
  18. int main(int argc, char **argv)
  19. {
  20. Model model;
  21. TinyGLTF loader;
  22. std::string err;
  23.  
  24. bool ret = loader.LoadASCIIFromFile(&model, &err, argv[1]);
  25. //bool ret = loader.LoadBinaryFromFile(&model, &err, argv[1]); // for binary glTF(.glb)
  26. if (!err.empty())
  27. cout << "Err: %s\n";
  28.  
  29.  
  30. if (!ret)
  31. {
  32. cout << "Failed to parse glTF\n";
  33. return -1;
  34. }
  35.  
  36.  
  37.  
  38.  
  39. cin.get();
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement